The following applet demonstrates a way to print rotated text.
Enter any text you like, choose a Font style, size and the number of degrees for rotation. The canvas below displays the rotated text as an image. The image is created on the fly, so change the settings slowly.
Note: The fonts you see in the choice list below are those supported by your browser.
The source code for this demo has two parts:
- Create an offscreen image on the fly. This is done in the createRotatedImage() method in RotateDemo.java.
- Rotate the image. This is done using RotateFilter.java distributed with The Java Tutorial: Object-Oriented Programming for the Internet to rotate an image.
Check the source code (RotateDemo.java and RotateFilter.java) for the legal stuff.
Last modified: Fri Jun 18 11:50:37 India Standard Time 1999
© Subbu Allamaraju 1998, 1999. All rights reserved.
All copyrights and trademarks acknowledged.