Hi BigLiu, BigLiu <[EMAIL PROTECTED]> wrote on 08/02/2007 05:19:03 PM:
> In original SVG file exported from Illustrator we have: > > <rect width="222.92" height="167.19" x="22.54" y="33.61" > transform="matrix(0.9509 -0.3095 0.3095 0.9509 -29.6934 47.2265)" /> > > I have some java code that will reverse engineer this to > > <rect width="222.92" height="167.19" x="22.54" y="33.61" > transform="translate(-29.6934 47.2265) rotate(-18)"> > > But actually I really need is to make it even simpler: > > <rect width="222.92" height="167.19" x="newX" y="newY" > transform="rotate(-18)"> To do this you need to map your translate through the rotate transform. I think this can be done by mapping the X,Y (translate) pair through the inverse of the rotation matrix. > newX could be: 22.54 + translateX*somefactor or some formula based on > original matrix value > newY could be: 33.61 + translateY*somefactor or some formula based on > original matrix value > > I want to get rid of translate(translateX, translateY) in the transform tag. > We have some tool only know how to do rotation based on x, y and rotation. > > I can not figure out the formula. Can anyone please help? > > Really appreciate. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
