Class TextStyle
The size and style of text as it should appear in an image.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawText(String textToDraw, BufferedImage image, Extent extent) Draws text on aBufferedImage.Font-color of drawn textFont-name of drawn textintFont-size of drawn textbooleanisBold()Whether to bold the drawn textvoidsetBold(boolean bold) Whether to bold the drawn textvoidsetFontColor(RGBColorBean fontColor) Font-color of drawn textvoidsetFontName(String fontName) Font-name of drawn textvoidsetFontSize(int fontSize) Font-size of drawn textMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
TextStyle
public TextStyle()
-
-
Method Details
-
drawText
Draws text on aBufferedImage.- Parameters:
textToDraw- the text to draw.image- the image.extent- the size of theimage.
-
getFontSize
public int getFontSize()Font-size of drawn text -
setFontSize
public void setFontSize(int fontSize) Font-size of drawn text -
getFontName
Font-name of drawn text -
setFontName
Font-name of drawn text -
getFontColor
Font-color of drawn text -
isBold
public boolean isBold()Whether to bold the drawn text -
setBold
public void setBold(boolean bold) Whether to bold the drawn text
-