>>>>> "YM" == Yang-Ming Zhu <[EMAIL PROTECTED]> writes:

YM> This could be a problem of getScaleX method or a misinterpretation
YM> of it.

YM> Any matrix transform can be decomposed into rotation, scaling, and
YM> translation. When you get scaleX, it simply returns the element at
YM> [0][0] which is not correct. It should have decomposed the
YM> transformation matrix into rotation matrix, scaling matrix, and
YM> translation matrix and return the element [0][0] of the scaling
YM> matrix.

    Be careful when you say they are "not correct".

    First they clearly document that getScaleX returns element [0][0].

    Second you are wrong to assume that every Affine matrix can be
decomposed into the three matrixes you list above.  In particular if
the matrix contains Shear components the above decomposition may not
be possible.

    This is why asking "What is the X scale factor?", which seems to
be a simple question, is not a trivial question at all.  You need a
set of assumptions about what the matrix can contain (such as your
assumption of no shearing) to make this a 'simple' question.

>> I have a question on the interrelation between rotation and
>> scaling.
>>
>> When I call g2.rotate(theta) it makes a change to the scaling.
>>
>> I find this surprising, I thought that I could do a rotation
>> independent of the scaling.

   This question has been answered much better in previous e-mails, so
I will leave it at that.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to