>>>>> "EP" == Ezberlin, Prakte12-08 <[EMAIL PROTECTED]> writes:
EP> Hello! I have a problem with applying transforms to shapes. I
EP> want to scale a polygon shape and I have to know about former
EP> transforms. The SVG-Tag looks like this:
EP> <polygon points="100,100 200,100 200,200 100,200" stroke="black"
EP> fill="none" transform=" translate(100,100) scale(2)
EP> translate(-100,-100) translate(50,50)"/> <polygon points="100,100
EP> 200,100 200,200 100,200" stroke="black" fill="none" transform="
EP> translate(100,100) scale(2) "/>
EP> When the SVG file is loaded and rendered first time following
EP> happens:
EP> In the first case the method
EP>
canvas.getBridgeContext().getGraphicsNode(element).getGlobalTransform().getTranslateX()
EP> returns 0, that is incorrect (in my opinion) In the second case it
EP> returns the correct value 100.
I guess I don't understand how you can consider 0 the incorrect
value. In your example there are too many "100's", are you looking
for the X&Y of the bounding box of the polygon?
EP> Any ideas how to work around this problem? I really need the
EP> correct transform to do correct scaling.
You _are_ getting the correct transforms I think you are just
missing the fact that the transforms define a user space and the
object is still rendered in that space, so your polygons both render
at 100,100 in their user space which is mapped to the global
coordinate system by the transform you get.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]