You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Alex McLintock <al...@yahoo.com> on 2001/05/02 13:16:32 UTC

viewBox

Hi folks, 

I see from the demo examples that viewBox seems to be doing something - 
but I was hoping to use it to clip some SVG objects and it doesn't seem to work 
(or do what I expected).

Can anyone say whether it is working correctly ?

I asked a similar question a couple of months ago and Aaron said he had submitted 
a patch for viewBox... Has it been committed?

Alex


----------------



Subject:  Re: [fop-dev] SVG Clipping
From:     Aaron Optimizer Digulla <di...@hepe.com>
Date:     2001-01-29 13:21:46
[Download message RAW]

On Mon, Jan 29, 2001 at 04:33:08AM -0800, Alex McLintock wrote:

> Hi folks, 
> 
> We've just started using SVG style images instead of bitmap images but seem to have
> problems with clipping. The source code suggests this is work in progress.

The bigger problem is scaling :-) I have yet to find a way to make
the same SVG look the same in Batik and FOP :-( The biggest
problem is that FOP doesn't support the viewBox attribute. I've
created a patch and posted it but it didn't show up in the CVS,
yet.

Without this, you cannot specify which part of the SVG should
show up where (ie. you will not see the correct portion
of the SVG and you won't get the correct size).

Question: What base unit is FOP using when I don't specify one ?
Ie. how large will this rectangle be ?

    <svg width="5cm" height="5cm">
        <g>
            <rect x="0" y="0" width="10" height="10"/>
        </g>
    </svg>


=====
Alex McLintock        alex@OWAL.co.uk
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: viewBox

Posted by Karen Lease <kl...@club-internet.fr>.
Now it's committed. It seems to work with my dia sequence diagram!

-Karen

Jeroen de Zwart wrote:
> 
> Almost all of the patches were committed except ONE. the patch for SVG.java
> without it the viewbox does not do a thing!
> 
> Hope anybody can commit it, so everybody can enjoy svg in fop.
> 
> ----- Original Message -----
> From: "Karen Lease" <kl...@club-internet.fr>
> To: <fo...@xml.apache.org>
> Sent: Wednesday, May 02, 2001 11:19 PM
> Subject: Re: viewBox
> 
> > Hi Alex,
> >
> > I can't remember if Aaron's patch was every committed. But I was trying
> > to import SVG generated by the "dia" tool and the viewBox it is using
> > isn't working right. From a quick look at the SVGRenderer code, I'd say
> > the current implementation is quite partial. However, as I understand it
> > (which could easily be wrong, as I'm quite a novice at SVG) viewBox on
> > the top level svg element defines a kind of automatic transformation
> > (scaling, translation). It doesn't really seem designed for clipping,
> > although I guess if the svg coordinates are outside the viewbox, it
> > should probably clip too.
> >
> > HTH,
> > Karen
> >
> > Alex McLintock wrote:
> > >
> > > Hi folks,
> > >
> > > I see from the demo examples that viewBox seems to be doing something -
> > > but I was hoping to use it to clip some SVG objects and it doesn't seem
> to work
> > > (or do what I expected).
> > >
> > > Can anyone say whether it is working correctly ?
> > >
> > > I asked a similar question a couple of months ago and Aaron said he had
> submitted
> > > a patch for viewBox... Has it been committed?
> > >
> > > Alex
> > >
> > > ----------------
> > >
> > > Subject:  Re: [fop-dev] SVG Clipping
> > > From:     Aaron Optimizer Digulla <di...@hepe.com>
> > > Date:     2001-01-29 13:21:46
> > > [Download message RAW]
> > >
> > > On Mon, Jan 29, 2001 at 04:33:08AM -0800, Alex McLintock wrote:
> > >
> > > > Hi folks,
> > > >
> > > > We've just started using SVG style images instead of bitmap images but
> seem to have
> > > > problems with clipping. The source code suggests this is work in
> progress.
> > >
> > > The bigger problem is scaling :-) I have yet to find a way to make
> > > the same SVG look the same in Batik and FOP :-( The biggest
> > > problem is that FOP doesn't support the viewBox attribute. I've
> > > created a patch and posted it but it didn't show up in the CVS,
> > > yet.
> > >
> > > Without this, you cannot specify which part of the SVG should
> > > show up where (ie. you will not see the correct portion
> > > of the SVG and you won't get the correct size).
> > >
> > > Question: What base unit is FOP using when I don't specify one ?
> > > Ie. how large will this rectangle be ?
> > >
> > >     <svg width="5cm" height="5cm">
> > >         <g>
> > >             <rect x="0" y="0" width="10" height="10"/>
> > >         </g>
> > >     </svg>
> > >
> > > =====
> > > Alex McLintock        alex@OWAL.co.uk
> > > OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> > > COMPETITION:
> http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> > > Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
> > >
> > > ____________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > > or your free @yahoo.ie address at http://mail.yahoo.ie
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: fop-dev-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > For additional commands, email: fop-dev-help@xml.apache.org
> 
>   ------------------------------------------------------------------------
>                      Name: viewBox3.patch
>    viewBox3.patch    Type: unspecified type (application/octet-stream)
>                  Encoding: 7bit
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: viewBox

Posted by Jeroen de Zwart <fa...@dds.nl>.
Almost all of the patches were committed except ONE. the patch for SVG.java
without it the viewbox does not do a thing!

Hope anybody can commit it, so everybody can enjoy svg in fop.

----- Original Message -----
From: "Karen Lease" <kl...@club-internet.fr>
To: <fo...@xml.apache.org>
Sent: Wednesday, May 02, 2001 11:19 PM
Subject: Re: viewBox


> Hi Alex,
>
> I can't remember if Aaron's patch was every committed. But I was trying
> to import SVG generated by the "dia" tool and the viewBox it is using
> isn't working right. From a quick look at the SVGRenderer code, I'd say
> the current implementation is quite partial. However, as I understand it
> (which could easily be wrong, as I'm quite a novice at SVG) viewBox on
> the top level svg element defines a kind of automatic transformation
> (scaling, translation). It doesn't really seem designed for clipping,
> although I guess if the svg coordinates are outside the viewbox, it
> should probably clip too.
>
> HTH,
> Karen
>
> Alex McLintock wrote:
> >
> > Hi folks,
> >
> > I see from the demo examples that viewBox seems to be doing something -
> > but I was hoping to use it to clip some SVG objects and it doesn't seem
to work
> > (or do what I expected).
> >
> > Can anyone say whether it is working correctly ?
> >
> > I asked a similar question a couple of months ago and Aaron said he had
submitted
> > a patch for viewBox... Has it been committed?
> >
> > Alex
> >
> > ----------------
> >
> > Subject:  Re: [fop-dev] SVG Clipping
> > From:     Aaron Optimizer Digulla <di...@hepe.com>
> > Date:     2001-01-29 13:21:46
> > [Download message RAW]
> >
> > On Mon, Jan 29, 2001 at 04:33:08AM -0800, Alex McLintock wrote:
> >
> > > Hi folks,
> > >
> > > We've just started using SVG style images instead of bitmap images but
seem to have
> > > problems with clipping. The source code suggests this is work in
progress.
> >
> > The bigger problem is scaling :-) I have yet to find a way to make
> > the same SVG look the same in Batik and FOP :-( The biggest
> > problem is that FOP doesn't support the viewBox attribute. I've
> > created a patch and posted it but it didn't show up in the CVS,
> > yet.
> >
> > Without this, you cannot specify which part of the SVG should
> > show up where (ie. you will not see the correct portion
> > of the SVG and you won't get the correct size).
> >
> > Question: What base unit is FOP using when I don't specify one ?
> > Ie. how large will this rectangle be ?
> >
> >     <svg width="5cm" height="5cm">
> >         <g>
> >             <rect x="0" y="0" width="10" height="10"/>
> >         </g>
> >     </svg>
> >
> > =====
> > Alex McLintock        alex@OWAL.co.uk
> > OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> > COMPETITION:
http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> > Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
> >
> > ____________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > or your free @yahoo.ie address at http://mail.yahoo.ie
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > For additional commands, email: fop-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

Re: viewBox

Posted by Karen Lease <kl...@club-internet.fr>.
Hi Alex,

I can't remember if Aaron's patch was every committed. But I was trying
to import SVG generated by the "dia" tool and the viewBox it is using
isn't working right. From a quick look at the SVGRenderer code, I'd say
the current implementation is quite partial. However, as I understand it
(which could easily be wrong, as I'm quite a novice at SVG) viewBox on
the top level svg element defines a kind of automatic transformation
(scaling, translation). It doesn't really seem designed for clipping,
although I guess if the svg coordinates are outside the viewbox, it
should probably clip too.

HTH,
Karen

Alex McLintock wrote:
> 
> Hi folks,
> 
> I see from the demo examples that viewBox seems to be doing something -
> but I was hoping to use it to clip some SVG objects and it doesn't seem to work
> (or do what I expected).
> 
> Can anyone say whether it is working correctly ?
> 
> I asked a similar question a couple of months ago and Aaron said he had submitted
> a patch for viewBox... Has it been committed?
> 
> Alex
> 
> ----------------
> 
> Subject:  Re: [fop-dev] SVG Clipping
> From:     Aaron Optimizer Digulla <di...@hepe.com>
> Date:     2001-01-29 13:21:46
> [Download message RAW]
> 
> On Mon, Jan 29, 2001 at 04:33:08AM -0800, Alex McLintock wrote:
> 
> > Hi folks,
> >
> > We've just started using SVG style images instead of bitmap images but seem to have
> > problems with clipping. The source code suggests this is work in progress.
> 
> The bigger problem is scaling :-) I have yet to find a way to make
> the same SVG look the same in Batik and FOP :-( The biggest
> problem is that FOP doesn't support the viewBox attribute. I've
> created a patch and posted it but it didn't show up in the CVS,
> yet.
> 
> Without this, you cannot specify which part of the SVG should
> show up where (ie. you will not see the correct portion
> of the SVG and you won't get the correct size).
> 
> Question: What base unit is FOP using when I don't specify one ?
> Ie. how large will this rectangle be ?
> 
>     <svg width="5cm" height="5cm">
>         <g>
>             <rect x="0" y="0" width="10" height="10"/>
>         </g>
>     </svg>
> 
> =====
> Alex McLintock        alex@OWAL.co.uk
> OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
> COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104
> Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
> 
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org