On Tuesday 03 July 2001 16:06, Sebastien Aurelie wrote:
> Hi,
>
> I need to paint a JScrollBar. I noticed that if the JScrollBar is very
> small you have only up and down buttons (no lift between), a fill3DRect to
> paint a rectangle with a negative height (-1) is called.
> You can see the trace I put in SVGShape.java and SVGRectangle.java:
>
>...
>
> I thought that it was an error, but in fact I get an SVG image identical to
> my JScrollPane.
> And if I modify the height of the rectangle (height becomes 0), I loose the
> rendering of my ScrollPane in my SVG Image.
> The problem is localized about JPEGTrancoder that I call next, to trancode
> my SVG image into JPEG Image.
>
> Here the exception I get with JPEG conversion:
>
> org.apache.batik.bridge.BridgeException:
> file:/C:/WINNT/Profiles/ausebast.000/cache/documentInterface51913.svg:0
> The attribute 'height' of the element <rect> can not be negative
The bridge module (the one that does the conversion from an SVG DOM tree to
our data structure GVT) complains that a reactangle has a height equal to 0.
I have three comment on that:
1. You are not doing something wrong :)
2. According to the SVG spec
height: "A negative value is an error (see Error processing). A value of zero
disables rendering of the element."
So, the bridge is wrong and should not complain. I will fix that ASAP.
3. The SVGGraphics2D might let the user know that something might go wrong
(and let you a chance to fix that).
Thanks for your feedback.
Thierry.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]