I am using the following values to assist with (clockwise) rotation:
90 degrees: 0, -1, 1, 0, 0, rect.height() 180 degrees: -1, 0, 0, -1, rect.width(), rect.height() 270 degrees: 0, 1, -1, 0, rect.width(), 0 0/360 degrees: 1, 0, 0, 1, 0, 0
Those seem correct...
These work, but I am having difficulty understanding how they fit into the cosine-sine-negative sine-cosine instructions in the tutorial and from Adobe. What is the formula that fits these data and would allow rotation to arbitrary angles?
It's not cos(degree), but cos(radian).
int angle = 180; double angleRad = Math.toRadians( (double)angle ); double cosRad = Math.cos( angleRad ); double sinRad = Math.sin( angleRad ); cb.concatCTM( cosRad, sinRad, -sinRad, cosRad, x, y );
Leonard -- --------------------------------------------------------------------------- Leonard Rosenthol <mailto:[EMAIL PROTECTED]> Chief Technical Officer <http://www.pdfsages.com> PDF Sages, Inc. 215-629-3700 (voice) 215-629-0789 (fax)
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC. Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
