Class ImageTransform

java.lang.Object
nl.colorize.multimedialib.stage.Transform
nl.colorize.multimedialib.stage.ImageTransform

public class ImageTransform extends Transform
Extension of Transform that adds additional properties for displaying images and sprites. 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.        |
| Rotation        | Angle, clockwise.                                                          |
| Scale X         | Percentage, where 100% indicates original size.                            |
| Scale Y         | Percentage, where 100% indicates original size.                            |
| Flip horizontal | When true, flips the image horizontally across its center.                 |
| Flip vertical   | When true, flips the image vertically across its center.                   |
| Mask color      | When set, displays all non-transparent pixels using the mask color.        |
  • Constructor Details

    • ImageTransform

      public ImageTransform()
  • Method Details

    • setRotation

      public void setRotation(Angle rotation)
    • setRotation

      public void setRotation(float degrees)
    • addRotation

      public void addRotation(float degrees)
    • setScale

      public void setScale(float scale)
    • setScaleX

      public void setScaleX(float scaleX)
    • getScaleX

      public float getScaleX()
    • setScaleY

      public void setScaleY(float scaleY)
    • getScaleY

      public float getScaleY()
    • set

      public void set(Transform other)
      Overrides:
      set in class Transform
    • combine

      public ImageTransform combine(Transform other)
      Returns a new ImageTransform instance that is the result of combining this transform with the specified other transform.
      Overrides:
      combine in class Transform
    • getRotation

      public Angle getRotation()
    • isFlipHorizontal

      public boolean isFlipHorizontal()
    • isFlipVertical

      public boolean isFlipVertical()
    • getMaskColor

      public ColorRGB getMaskColor()
    • setFlipHorizontal

      public void setFlipHorizontal(boolean flipHorizontal)
    • setFlipVertical

      public void setFlipVertical(boolean flipVertical)
    • setMaskColor

      public void setMaskColor(ColorRGB maskColor)