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 TypeMethodDescriptionvoid
drawText
(String textToDraw, BufferedImage image, Extent extent) Draws text on aBufferedImage
.Font-color of drawn textFont-name of drawn textint
Font-size of drawn textboolean
isBold()
Whether to bold the drawn textvoid
setBold
(boolean bold) Whether to bold the drawn textvoid
setFontColor
(RGBColorBean fontColor) Font-color of drawn textvoid
setFontName
(String fontName) Font-name of drawn textvoid
setFontSize
(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
-