Package rendering
Class TextArtist
java.lang.Object
rendering.Artist
rendering.TextArtist
Rendering an object as a text of a specified color, size and font.
-
Constructor Summary
ConstructorDescriptionTextArtist
(GameObject go, String text, int size, Color textColor) Constructor to intitialize the TextArtist attributes -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g) Draw the text.getText()
double
double
void
void
setTextHeight
(double textHeight) void
setTextWidth
(double textWidth)
-
Constructor Details
-
TextArtist
Constructor to intitialize the TextArtist attributes- Parameters:
go
- GameObject to be used for xy coordinate referencetext
- the text to drawsize
- point size to be used for font "Serif"textColor
- color to draw the text with (foreground)
-
-
Method Details
-
getText
-
setText
-
getTextWidth
public double getTextWidth() -
setTextWidth
public void setTextWidth(double textWidth) -
getTextHeight
public double getTextHeight() -
setTextHeight
public void setTextHeight(double textHeight) -
draw
Draw the text.
-