Package com.xebisco.yield.rendering
Class Paint
java.lang.Object
com.xebisco.yield.rendering.Paint
Paint class for rendering objects with specified attributes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the color of the object to be drawn.drawObj()Returns the object referencelike image referencesto be drawn.font()Returns the font to be used for the text.booleanhasImage()Returns true whether an image should be included in the object to be drawn.rectSize()Returns the size of the rectangle to be drawn.Sets the color of the object to be drawn.setDrawObj(Object drawObj) Sets the object reference to be drawn.Sets the font to be used for the text.setHasImage(boolean hasImage) Sets whether an image should be included in the object to be drawn.setRectSize(Vector2D rectSize) Sets the size of the rectangle in which the object will be drawn.Sets the text to be displayed.setTransformation(Transform2D transformation) Sets the transformation to be applied to the object before drawing.text()Returns the text to be displayed.Returns the transformation to be applied to the object before drawing.
-
Constructor Details
-
Paint
public Paint()
-
-
Method Details
-
drawObj
Returns the object referencelike image referencesto be drawn.- Returns:
- the object reference to be drawn
-
setDrawObj
Sets the object reference to be drawn.- Parameters:
drawObj- the object reference to be drawn- Returns:
- this instance of the
Paintclass for method chaining
-
transformation
Returns the transformation to be applied to the object before drawing.- Returns:
- the transformation to be applied
-
setTransformation
Sets the transformation to be applied to the object before drawing.- Parameters:
transformation- the transformation to be applied- Returns:
- this instance of the
Paintclass for method chaining
-
hasImage
public boolean hasImage()Returns true whether an image should be included in the object to be drawn.- Returns:
- true if an image is included, false otherwise
-
setHasImage
Sets whether an image should be included in the object to be drawn.- Parameters:
hasImage- true if an image should be included, false otherwise- Returns:
- this instance of the
Paintclass for method chaining
-
color
Returns the color of the object to be drawn.- Returns:
- the color of the object to be drawn
-
setColor
Sets the color of the object to be drawn.- Parameters:
color- the color of the object to be drawn- Returns:
- this instance of the
Paintclass for method chaining
-
text
Returns the text to be displayed.- Returns:
- the text to be displayed
-
setText
Sets the text to be displayed.- Parameters:
text- the text to be displayed- Returns:
- this instance of the
Paintclass for method chaining
-
font
Returns the font to be used for the text.- Returns:
- the font to be used for the text
-
setFont
Sets the font to be used for the text.- Parameters:
font- the font to be used for the text- Returns:
- this instance of the
Paintclass for method chaining
-
rectSize
Returns the size of the rectangle to be drawn.- Returns:
- the size of the rectangle
-
setRectSize
Sets the size of the rectangle in which the object will be drawn.- Parameters:
rectSize- the size of the rectangle- Returns:
- this instance of the
Paintclass for method chaining
-