xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Plotkin <erkyr...@eblong.com>
Subject RE: Extracting information from a transformation matrix
Date Fri, 02 Jun 2006 03:47:12 GMT
On Thu, 1 Jun 2006, Bishop, Michael W. CONTR J9C880 wrote:

> Ouch.  Major headache.
> Assume that the transformation is always in order:
> translate(x,y) scale(sx, sy) rotate(t, cx, cy)
> As stated, we're given cx, and cy:
> transform="translate(20, 20) scale(3,3) rotate(60, 2, 2)"
> At this point I've dragged the element some unknown amount.  Although 
> translate says (20, 20), I know this is not correct because I've also 
> scaled and rotated.

Honestly, the easiest thing to do is store it as a matrix. Multiply your 
translate(20,20) matrix on the right (or is it the left?) and you'll get 
the correct answer. Don't convert it to "translate(x,y) scale(sx, sy) 
rotate(t, cx, cy)" until you need to.


"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
If the Bush administration hasn't subjected you to searches without a warrant,
it's for one reason: they don't feel like it. Not because you're innocent.

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

View raw message