Java Utililty Methods Draw Vertical String

List of utility methods to do Draw Vertical String

Description

The list of methods to do Draw Vertical String are organized into topic(s).

Method

voiddrawVerticalString(Graphics g, String text, Font font, int x, int y)
Draws a string vertically, turned 90 degrees counter-clockwise.
Graphics2D g2 = (Graphics2D) g;
AffineTransform fontAT = new AffineTransform();
fontAT.setToRotation(Math.PI * 3.0f / 2.0f); 
FontRenderContext frc = g2.getFontRenderContext();
Font theDerivedFont = font.deriveFont(fontAT);
TextLayout tstring = new TextLayout(text, theDerivedFont, frc);
tstring.draw(g2, x, y);