Class Paint

java.lang.Object
com.xebisco.yield.rendering.Paint

public class Paint extends Object
Paint class for rendering objects with specified attributes.
  • Constructor Details

    • Paint

      public Paint()
  • Method Details

    • drawObj

      public Object drawObj()
      Returns the object reference like image references to be drawn.
      Returns:
      the object reference to be drawn
    • setDrawObj

      public Paint setDrawObj(Object drawObj)
      Sets the object reference to be drawn.
      Parameters:
      drawObj - the object reference to be drawn
      Returns:
      this instance of the Paint class for method chaining
    • transformation

      public Transform2D transformation()
      Returns the transformation to be applied to the object before drawing.
      Returns:
      the transformation to be applied
    • setTransformation

      public Paint setTransformation(Transform2D transformation)
      Sets the transformation to be applied to the object before drawing.
      Parameters:
      transformation - the transformation to be applied
      Returns:
      this instance of the Paint class 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

      public Paint setHasImage(boolean hasImage)
      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 Paint class for method chaining
    • color

      public Color color()
      Returns the color of the object to be drawn.
      Returns:
      the color of the object to be drawn
    • setColor

      public Paint setColor(Color color)
      Sets the color of the object to be drawn.
      Parameters:
      color - the color of the object to be drawn
      Returns:
      this instance of the Paint class for method chaining
    • text

      public String text()
      Returns the text to be displayed.
      Returns:
      the text to be displayed
    • setText

      public Paint setText(String text)
      Sets the text to be displayed.
      Parameters:
      text - the text to be displayed
      Returns:
      this instance of the Paint class for method chaining
    • font

      public Font font()
      Returns the font to be used for the text.
      Returns:
      the font to be used for the text
    • setFont

      public Paint setFont(Font font)
      Sets the font to be used for the text.
      Parameters:
      font - the font to be used for the text
      Returns:
      this instance of the Paint class for method chaining
    • rectSize

      public Vector2D rectSize()
      Returns the size of the rectangle to be drawn.
      Returns:
      the size of the rectangle
    • setRectSize

      public Paint setRectSize(Vector2D rectSize)
      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 Paint class for method chaining