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/06/04 03:49:59 UTC
DO NOT REPLY [Bug 39714] New: - DefaultExtensionHandler derived class's handlePaint is not getting invoked
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=39714>.
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=39714
Summary: DefaultExtensionHandler derived class's handlePaint is
not getting invoked
Product: Batik
Version: 1.6
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: SVGGraphics2D
AssignedTo: batik-dev@xmlgraphics.apache.org
ReportedBy: aprinaresh97@gmail.com
I have following implementation to write out svg file. I have geometry with
LinearGradient fill attribute. When I render that to the SVG2DGraphics, the
handlePaint of the derived class is not getting invoked. Is this an known
issue or am I missing something in my code? The following code is based on the
example given in the svggen documentation.
try
{
String scSvgNsURI = "http://www.w3.org/2000/svg";
DOMImplementation zDomImpl =
GenericDOMImplementation.getDOMImplementation();
Document zDocument = zDomImpl.createDocument(scSvgNsURI, "svg", null);
SVGGeneratorContext zSvgCtx =
SVGGeneratorContext.createDefault(zDocument);
GenericImageHandler zImgHandler =
new CachedImageHandlerBase64Encoder();
zSvgCtx.setGenericImageHandler(zImgHandler);
zSvgCtx.setExtensionHandler(new SvgExtensionHandler());
SVGGraphics2D zSvgGraphics = new SVGGraphics2D(zSvgCtx, true);
IDrawingSurface zDrawingSurface = super.getDrawingSurface();
zSvgGraphics.setRenderingHint(
RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
zSvgGraphics.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
zSvgGraphics.setRenderingHint(
RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_QUALITY);
// zSvgCtx.getGraphicContextDefaults().setRenderingHints(
// zSvgGraphics.getRenderingHints());
// SVGHintsDescriptor zSvgHintsDesc =
// SVGRenderingHints.toSVG(
// zSvgGraphics.getRenderingHints());
//
// - Following code renders all the geometry primitives to the given
// graphics
//
zDrawingSurface.render( zSvgGraphics,
super.getActiveGeomContainer() );
Writer zWriter = new OutputStreamWriter(
new FileOutputStream(zFile),
"UTF-8");
zSvgGraphics.stream(zWriter, false);
}
catch( Exception zExcept )
{
}
/**
* Inner class to handle paint extensions.
*/
private class SvgExtensionHandler extends DefaultExtensionHandler
implements SVGConstants
{
public SVGPaintDescriptor handlePaint( Paint zPaint,
SVGGeneratorContext zContext )
{
System.out.println( "HandlePaint called: " +
zPaint.getClass().getName() );
}
}
--
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 39714] - DefaultExtensionHandler derived class's handlePaint is not getting invoked
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=39714>.
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=39714
cam@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEEDINFO
--
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 39714] - DefaultExtensionHandler derived class's handlePaint is not getting invoked
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=39714>.
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=39714
deweese@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From deweese@apache.org 2006-06-05 23:18 -------
I've looked at the code (yours and Batik's) and it all seems good.
Can you provide a standalone test case that reproduces the problem?
--
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