xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Aurelie <Aurelie.Sebast...@artesiaservices.be>
Subject SwingSVGPrettyPrint and JPEGTranscoder
Date Tue, 03 Jul 2001 14:06:26 GMT
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:
 

printHack :
javax.swing.JScrollPane$ScrollBar[,483,25,15x28,layout=javax.swing.plaf.meta
l.MetalScrollBarUI,alignmentX=null,alignmentY=null,border=,flags=1185,maximu
mSize=,minimumSize=,preferredSize=,blockIncrement=10,orientation=VERTICAL,un
itIncrement=1] 
Shape is : java.awt.geom.GeneralPath@58b7f Shape is :
java.awt.geom.GeneralPath@3dc777 
Shape is : java.awt.Rectangle[x=0,y=0,width=15,height=28] 
rect height = 28 
Shape is : java.awt.geom.Line2D$Float@7282a1 
Shape is : java.awt.geom.GeneralPath@5e4fa6 
Shape is : java.awt.geom.Line2D$Float@3f4547 
Shape is : java.awt.geom.Line2D$Float@5d669a 
Shape is : java.awt.geom.Line2D$Float@7b41d6
Shape is : java.awt.geom.Line2D$Float@1f6177 
Shape is : java.awt.geom.Line2D$Float@380316 
Shape is : java.awt.geom.Line2D$Float@529976 
Shape is : java.awt.geom.Line2D$Float@5941d7 
Shape is : java.awt.Rectangle[x=0,y=0,width=0,height=-1] 
rect height = -1 
Shape is : java.awt.Rectangle[x=0,y=0,width=0,height=-1] 
rect height = -1 

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 	
at
org.apache.batik.bridge.UnitProcessor.svgLengthToUserSpace(UnitProcessor.jav
a:344) 	
at
org.apache.batik.bridge.UnitProcessor.svgVerticalLengthToUserSpace(UnitProce
ssor.java:273) 	
at
org.apache.batik.bridge.SVGRectElementBridge.buildShape(SVGRectElementBridge
.java:85) 	
at
org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(SVGShapeEle
mentBridge.java:44) 	
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:170)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)

at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:136)

at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:69) 	
at
org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.
java:155) 	
at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTrans
coder.java:126)


Any Idea? 






---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message