xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: cropping of thick strokes
Date Thu, 03 Feb 2011 10:55:58 GMT
Hi Wade, Peter,

"G. Wade Johnson" <gwadej@anomaly.org> wrote on 02/02/2011 06:31:03 PM:

> The cause of your symptom is probably the overflow attribute (which is
> defaulted on svg in this case). From the SVG 1.1 spec, section 14.3.3:
> 
> So basically, the image is clipped at x=0 and y=0. Since the rectangle
> has a stroke-width of 10 and starts at 0,0, the top and left edges
> should be about half as thick. Since the stroke is centered on the
> coordinates you give.

        Close (it has to do with the overflow) but not quite right.  Since 

the element is used at 100,100 it should not be clipped by the SVG 
elements
implicit clipping rectangle.

> Peter Hull <peterhull90@gmail.com> wrote:
> 
> > I noticed that Batik will crop the edges of thick stroke lines so for
> > example[...] will show a rect with apparently a thinner stroke on the 
top/left
> > because it was cropped at x=0 and y=0, even though the final shape is
> > rendered in the middle of the page.
> > 
> > Just for my information, is that to do with Batik's implementation or
> > is it in the SVG spec (I couldn't find the relevant section)

        It's getting clipped by the 'symbol' element's clipping rectangle.
If you read the symbol and use sections of the SVG Spec:
        http://www.w3.org/TR/SVG/struct.html

        You will see that when a use references a symbol, a hidden
tree is created where the symbol element is replaced with an 'svg'
element.  Since an svg element defaults to clipping to the viewBox
the symbol defaults to clipping.  If you want to avoid this clip
you can set 'overflow="visible"' on the symbol element (or adjust it's
viewBox so it includes the child content).
Thomas DeWeese | CDG Advanced Development | 
Eastman Kodak Company | 343 State Street | Rochester, NY 14650-0128 | 
Thomas.DeWeese@Kodak.com | 585 724-0294 | 
www.kodak.com 

Mime
View raw message