Class TextStyle
Object
org.anchoranalysis.bean.AnchorBean<TextStyle>
org.anchoranalysis.image.io.bean.stack.combine.TextStyle
public class TextStyle extends AnchorBean<TextStyle>
The size and style of text as it should appear in an image.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description TextStyle() -
Method Summary
Modifier and Type Method Description voiddrawText(String textToDraw, BufferedImage image, org.anchoranalysis.spatial.box.Extent extent)Draws text on aBufferedImage.RGBColorBeangetFontColor()Font-color of drawn textStringgetFontName()Font-name of drawn textintgetFontSize()Font-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
public void drawText(String textToDraw, BufferedImage image, org.anchoranalysis.spatial.box.Extent extent)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 -
setFontColor
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
-