xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Bunn <...@basen.net>
Subject Re: Identifying SVG DOM node equivalents in GVT
Date Fri, 22 Sep 2006 16:06:03 GMT

On Sep 21, 2006, at 13:16 , thomas.deweese@kodak.com wrote:

>    And yes the SVGLocatable interface is the right interface
> for querying and manipulating the transform.  Also don't be
> afraid to insert additional grouping elements to adjust the
> transform.

Hm. What are the prerequisites to using the SVGLocatable transforms?
Should I be able to add an element and transform it like this?

   // ...load SVGDocument...
   Element g = svgDocument.createElementNS 
( SVGConstants.SVG_NAMESPACE_URI, SVGConstants.SVG_G_TAG );
   someElement.appendChild( g );
   SVGMatrix xform = SVGLocatableSupport.getCTM( g );
   xform.translate( 42.0f, 42.0f );
   // ...proceed to rendering...


This produces a NullPointerException in the anonymous SVGMatrix  
implementation by SVGLocatableSupport.getCTM() - the 'g' I created  
doesn't have an SVGContext yet. I suppose I'm skipping essential  
steps... Do I need to build a GVT first, or do some sort of update?

Thanks,
//ebu




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


Mime
View raw message