T
- pixel type of imagepublic class HersheyFontStyle<T> extends FontStyle<T>
FontStyle.FontStyleAttribute, FontStyle.HorizontalAlignment, FontStyle.VerticalAlignment
Modifier and Type | Field and Description |
---|---|
static AttributedCharacterIterator.Attribute |
HEIGHT_SCALE
Attribute for height scaling.
|
static AttributedCharacterIterator.Attribute |
ITALIC_SLANT
Attribute for the amount of slant for italic text.
|
static AttributedCharacterIterator.Attribute |
STROKE_WIDTH
Attribute for the stroke width.
|
static AttributedCharacterIterator.Attribute |
WIDTH_SCALE
Attribute for width scaling.
|
angle, ANGLE, colour, COLOUR, font, FONT, FONT_SIZE, fontSize, HORIZONTAL_ALIGNMENT, horizontalAlignment, italic, ITALIC, VERTICAL_ALIGNMENT, verticalAlignment
Modifier | Constructor and Description |
---|---|
protected |
HersheyFontStyle(HersheyFont font,
ImageRenderer<T,?> image)
Construct with the default parameters for the given image type
|
Modifier and Type | Method and Description |
---|---|
float |
getActualHeightScale()
Get the actual scale to render the font at.
|
float |
getActualWidthScale()
Get the actual scale to render the font at.
|
float |
getHeightScale() |
float |
getItalicSlant() |
int |
getStrokeWidth() |
float |
getWidthScale() |
void |
parseAttributes(Map<? extends AttributedCharacterIterator.Attribute,Object> attrs)
Parse the attributes map and set this FontStyle accordingly.
|
void |
setHeightScale(float heightScale) |
void |
setItalicSlant(float italicSlant) |
void |
setStrokeWidth(int strokeWidth) |
void |
setWidthScale(float widthScale) |
getAngle, getColour, getFont, getFontSize, getHorizontalAlignment, getRenderer, getVerticalAlignment, isItalic, parseAttributes, setAngle, setColour, setFont, setFontSize, setHorizontalAlignment, setItalic, setVerticalAlignment
public static final AttributedCharacterIterator.Attribute STROKE_WIDTH
public static final AttributedCharacterIterator.Attribute WIDTH_SCALE
public static final AttributedCharacterIterator.Attribute HEIGHT_SCALE
public static final AttributedCharacterIterator.Attribute ITALIC_SLANT
protected HersheyFontStyle(HersheyFont font, ImageRenderer<T,?> image)
image
- public void parseAttributes(Map<? extends AttributedCharacterIterator.Attribute,Object> attrs)
FontStyle
parseAttributes
in class FontStyle<T>
attrs
- the attribute mappublic int getStrokeWidth()
public void setStrokeWidth(int strokeWidth)
strokeWidth
- the strokeWidth to setpublic float getWidthScale()
public void setWidthScale(float widthScale)
widthScale
- the widthScale to setpublic float getHeightScale()
public void setHeightScale(float heightScale)
heightScale
- the heightScale to setpublic float getItalicSlant()
public void setItalicSlant(float italicSlant)
italicSlant
- the italicSlant to setpublic float getActualWidthScale()
public float getActualHeightScale()