public class G2TextMeasurer extends Object implements TextMeasurer
TextMeasurer based on a Graphics2D.| Constructor and Description |
|---|
G2TextMeasurer(Graphics2D g2)
Creates a new text measurer.
|
public G2TextMeasurer(Graphics2D g2)
g2 - the graphics device.public float getStringWidth(String text, int start, int end)
getStringWidth in interface TextMeasurertext - the text.start - the index of the first character to measure.end - the index of the last character to measure.Copyright © 2009-2012 jtstand.com. All Rights Reserved.