Hi Hoverfrog,

-----hoverfrog <[EMAIL PROTECTED]> wrote: -----

> Using the clipart from openclipart, if i call:

> Affinetransform currentTransform = node.getTransform();
> Shape shape = currentTransform.createTransformedShape(shape);

> approximately half of the clipart works beautifully.

> If I use node.getGlobalTransform(), which from the docs appears to
> be what is required,  then the other half of the clipart library
> works beautifully but not the original half!

   If I understand correctly then the most likely problem
is how the content of the clipart is mapped through the
'viewing' transform.  The viewing transform is defined by
the combination of the width/height and viewBox attributes
on the outermost SVG element.  IIRC someone was saying a
lot of the clipart lacked these attributes in which case
the values are defaulted, which might cause the problem for
the clipart that doesn't work properly with getGlobalTransform
(which is the correct version to use).

> I appreciate I'm trying to do something a bit out of the ordinary
> here :) but has anyone got any ideas on how I can distinguish between
> the svg files that require getTransform() and those that need
> getGlobalTransform()?

    I think you need to figure out what is causing 'getGlobalTransform'
to fail and fix it, 'getTransform' can not work relably.

Reply via email to