Class Transform

java.lang.Object
nl.colorize.multimedialib.stage.Transform
Direct Known Subclasses:
ImageTransform

public class Transform extends Object
Describes how 2D graphics should be displayed, using a number of properties. The following properties are available:

| Property        | Description                                                                |
|-----------------|----------------------------------------------------------------------------|
| Visible         | When set to false, the graphic will not be displayed at all.               |
| Position        | X/Y coordinates of where the graphic's center is displayed on the canvas.  |
| Alpha           | Percentage, where 0% is fully transparent and 100% is fully opaque.        |

This class contains the "base" properties that are available to all graphics types. See ImageTransform for additional properties that are available when displaying images.

  • Constructor Details

    • Transform

      public Transform()
  • Method Details

    • setPosition

      public void setPosition(Point2D position)
    • setPosition

      public void setPosition(float x, float y)
    • setX

      public void setX(float x)
    • setY

      public void setY(float y)
    • addPosition

      public void addPosition(float deltaX, float deltaY)
    • getX

      public float getX()
    • getY

      public float getY()
    • setAlpha

      public void setAlpha(float alpha)
    • set

      public void set(Transform other)
    • combine

      public Transform combine(Transform other)
      Returns a new Transform instance that is the result of combining this transform with the specified other transform.
    • isVisible

      public boolean isVisible()
    • getPosition

      public Point2D getPosition()
    • getAlpha

      public float getAlpha()
    • setVisible

      public void setVisible(boolean visible)