Hi Carsten,
This is not really a bug in GVT. There are two things you are probably missing. The first is that the stroke is centered on the outline of the shape. So in this case you have 1.5 pixels of stroke inside the rect and 1.5 pixels of stroke outside the rect.
Your SVG element indicates that the area 0,0->110,110 should be rendered. This fully includes the rectangle but only part of the stroke. If you added 'viewBox="-1.5 -1.5 114 114" (and upped width/height to 114) it would render your 3 pixel stroke.
The reason you get a 2 pixel stroke on the left/top and a 1 pixel stroke on the bottom/right is due to a bias that the JDK introduces so that x=0 runs through the center of the left most pixel in the display (this makes it so lines drawn at integer locations aren't anti-aliased.
Carsten Birn wrote:
Hi
I think i found a bug in the Batik GVT Renderer.
I have an example: - - - - - - - - - - - - - - - - - - - - - <svg version="1.0" width="111" height="111" id="rectangle" xmlns="http://www.w3.org/2000/svg">
<rect
x="0"
y="0"
width="111"
height="111"
fill="lightblue"
stroke="black"
stroke-width="3"
/>
</svg>
- - - - - - - - - - - - - - - - - - - - - - As attachment is a screenshot from Squiggle (Manipulated with Gimp)
It shows that the top/left bound is 2px and the bottom/right is 1 px
I had expected the rect stroke to be 3px. when i increas the total width/height in <SVG> the strokes changes but are still false.
How can i determine the correct size of the above example? Any one with same experiences...?
Carsten Birn
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
