You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/11/01 16:38:28 UTC
DO NOT REPLY [Bug 40862] New: - SVG image with gradients color filling fails to render
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40862>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40862
Summary: SVG image with gradients color filling fails to render
Product: Batik
Version: 2.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Bridge
AssignedTo: batik-dev@xmlgraphics.apache.org
ReportedBy: aboyko@ca.ibm.com
I have 2 SVG images one with flat color filling another with gradient color
filling (will be attached). Both files were created with Inkscape 0.44.1 (open
source program).
The issue was discovered in GMF. A GMF client application is capable of
dropping SVG image files on the diagram, hence image is rendered and drawn on
the diagram surface. Essentially image with flat color filling is rendered and
appears on the diagram, the image with gradient color filling fails to render
and throws an exception: (info on exception from Eclipse error log)
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://www.w3.org/2000/svg:-1
An I/O error occured while processing the URI:
"file:/C:/Documents and
Settings/Daniel/Desktop/shape/aspect.svg#linearGradient1890"
specified on the element <rect>
Note: Full stack trace is provided on the bottom
The file C:/Documents and Settings/Daniel/Desktop/shape/aspect.svg doesn't
exist on my system, hence I removed the attribute referencing this file from
the SVG file (gradient color filling) and everything worked out perfect, i.e.
the image with gradient color is rendered. (Attribute:
xml:base="file:/C:/Documents and Settings/Daniel/Desktop/shape/aspect.svg"
inside the "svg" tag on the top of the file.)
However, SVG image viewers/editors I've tried to open these 2 SVG files render
both the flat color filling and the gradient color filling images without any
problems or warning messages. That's why I think it could be a bug in batik.
If this is not a batik bug, perhaps you could give an idea, what lead to this
exception. Thanks in advance.
Trace:
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://www.w3.org/2000/svg:-1
An I/O error occured while processing the URI:
"file:/C:/Documents and
Settings/Daniel/Desktop/shape/aspect.svg#linearGradient1890"
specified on the element <rect>
at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.ImageTranscoderEx.tra
nscode(ImageTranscoderEx.java:306)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown
Source)
at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImageConverter.set
UpTranscoders(SVGImageConverter.java:148)
at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImageConverter.ren
derSVGtoSWTImage(SVGImageConverter.java:74)
at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage.renderImage
(SVGImage.java:68)
at
org.eclipse.gmf.runtime.draw2d.ui.render.internal.AbstractRenderedImage.getSWTI
mage(AbstractRenderedImage.java:130)
at
org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure.getPreferr
edSize(ScalableImageFigure.java:258)
at org.eclipse.draw2d.StackLayout.calculatePreferredSize
(StackLayout.java:71)
at org.eclipse.draw2d.AbstractLayout.getPreferredSize
(AbstractLayout.java:93)
at org.eclipse.draw2d.AbstractHintLayout.getPreferredSize
(AbstractHintLayout.java:85)
at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:735)
at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:725)
at org.eclipse.draw2d.DelegatingLayout.calculatePreferredSize
(DelegatingLayout.java:49)
at org.eclipse.draw2d.AbstractLayout.getPreferredSize
(AbstractLayout.java:93)
at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:735)
at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:725)
at
org.eclipse.gmf.runtime.diagram.ui.figures.FixedDistanceGatedPaneFigure.layout
(FixedDistanceGatedPaneFigure.java:157)
at org.eclipse.draw2d.Figure.validate(Figure.java:1735)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at
org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemsAwareFreeFormLayer.valida
te(BorderItemsAwareFreeFormLayer.java:53)
at
org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart$1.validate
(DiagramEditPart.java:163)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at
org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemsAwareFreeFormLayer.valida
te(BorderItemsAwareFreeFormLayer.java:53)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at org.eclipse.draw2d.Figure.validate(Figure.java:1737)
at
org.eclipse.draw2d.FreeformViewport$FreeformViewportLayout.calculatePreferredSi
ze(FreeformViewport.java:28)
at org.eclipse.draw2d.AbstractLayout.getPreferredSize
(AbstractLayout.java:93)
at org.eclipse.draw2d.AbstractHintLayout.getPreferredSize
(AbstractHintLayout.java:85)
at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:735)
at org.eclipse.draw2d.ScrollPaneSolver.solve(ScrollPaneSolver.java:75)
at org.eclipse.draw2d.FigureCanvas.layoutViewport
(FigureCanvas.java:238)
at org.eclipse.draw2d.FigureCanvas.access$4(FigureCanvas.java:236)
at org.eclipse.draw2d.FigureCanvas$3.notifyValidating
(FigureCanvas.java:201)
at org.eclipse.draw2d.UpdateManager.fireValidating
(UpdateManager.java:123)
at org.eclipse.draw2d.DeferredUpdateManager.performValidation
(DeferredUpdateManager.java:188)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$ToggleUpdateMan
ager.performValidation(DiagramGraphicalViewer.java:124)
at org.eclipse.draw2d.DeferredUpdateManager.performUpdate
(DeferredUpdateManager.java:165)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$ToggleUpdateMan
ager.performUpdate(DiagramGraphicalViewer.java:114)
at org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run
(DeferredUpdateManager.java:46)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 40862] - SVG image with gradients color filling fails to render
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40862>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40862
deweese@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From deweese@apache.org 2006-11-02 16:45 -------
(In reply to comment #0)
> The file C:/Documents and Settings/Daniel/Desktop/shape/aspect.svg doesn't
> exist on my system, hence I removed the attribute referencing this file from
> the SVG file (gradient color filling) and everything worked out perfect, i.e.
> the image with gradient color is rendered. (Attribute:
> xml:base="file:/C:/Documents and Settings/Daniel/Desktop/shape/aspect.svg"
> inside the "svg" tag on the top of the file.)
So the xml:base attribute is used to identify the base URI to resolve
relative URL's against. To be honest it is a little unclear to me what
should happen for a href that consists only of a fragment identifier
however reading section 4.2 of http://www.ietf.org/rfc/rfc2396.txt
leads me to believe that Batik's behavior is in error. Any other
opinions? Are we really supposed to tread just fragment identifiers
as a special case?
At the very least it is poor form to set xml:base to an
'incorrect' value, although it is possible that in this case
it should work.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 40862] - SVG image with gradients color filling fails to render
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40862>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40862
------- Additional Comments From cam@apache.org 2006-11-02 17:02 -------
(In reply to comment #3)
> So the xml:base attribute is used to identify the base URI to resolve
> relative URL's against. To be honest it is a little unclear to me what
> should happen for a href that consists only of a fragment identifier
> however reading section 4.2 of http://www.ietf.org/rfc/rfc2396.txt
> leads me to believe that Batik's behavior is in error. Any other
> opinions? Are we really supposed to tread just fragment identifiers
> as a special case?
Hmm, the wording in 4.2 about "if the URI reference occurs in a context that is
always intended to result in a new request" is a bit dodgy, but I would guess
that paint server references aren't always intended to result in a new request.
So since it says that if the URI reference has no URI in it, then it's a
"same-document" reference, I agree that the current beahviour is a bug.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 40862] - SVG image with gradients color filling fails to render
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40862>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40862
------- Additional Comments From aboyko@ca.ibm.com 2006-11-01 07:40 -------
Created an attachment (id=19065)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19065&action=view)
flat color filling image
Flat color filling image
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 40862] - SVG image with gradients color filling fails to render
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40862>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40862
------- Additional Comments From aboyko@ca.ibm.com 2006-11-01 07:41 -------
Created an attachment (id=19066)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19066&action=view)
gradient color filling image
Gradient color filling image.
Note: These 2 files have been created with Inkscape 0.44.1 (open source
program). SVG_flat.svg was created by changing the color filing to a flat color
instead of gradient.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org