public class G2TextMeasurer extends Object implements TextMeasurer
TextMeasurer
based on a Graphics2D
.Constructor and Description |
---|
G2TextMeasurer(Graphics2D g2)
Creates a new text measurer.
|
Modifier and Type | Method and Description |
---|---|
float |
getStringWidth(String text,
int start,
int end)
Returns the string width.
|
public G2TextMeasurer(Graphics2D g2)
g2
- the graphics device.public float getStringWidth(String text, int start, int end)
getStringWidth
in interface TextMeasurer
text
- the text.start
- the index of the first character to measure.end
- the index of the last character to measure.Copyright © 2001–2017 JFree.org. All rights reserved.