Results 1 to 1 of 1
Thread: affineTransform rotation
- 07-18-2007, 08:55 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 6
- Rep Power
- 0
affineTransform rotation
Hi,
I'm trying to understand how the rotation method works.
I have some text which I want rotated and placed in a specific place, the bottom-left of a rectangle which I created.
I want to be able to add more text aligned to this one and I'd like to understand what general coordinates I need to use to get it right.Java Code:AffineTransform af = new AffineTransform(); af.translate([COLOR="Red"]0,0[/COLOR]); af.rotate(Math.toRadians(-45)); FontRenderContext renderContext = new FontRenderContext(null, false, false); s2d.transform(af); TextLayout layout = new TextLayout("15 march",s2d.getFont (),renderContext); layout.draw(s2d, [COLOR="red"]0, 0[/COLOR]);
Thank you
Mich
Similar Threads
-
Rotation in java 3D
By émilie- in forum Java AppletsReplies: 0Last Post: 02-13-2008, 10:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks