Class ImageTransform
java.lang.Object
nl.colorize.multimedialib.stage.Transform
nl.colorize.multimedialib.stage.ImageTransform
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRotation(float degrees) Returns a newImageTransforminstance that is the result of combining this transform with the specified other transform.floatfloatbooleanbooleanvoidvoidsetFlipHorizontal(boolean flipHorizontal) voidsetFlipVertical(boolean flipVertical) voidsetMaskColor(ColorRGB maskColor) voidsetRotation(float degrees) voidsetRotation(Angle rotation) voidsetScale(float scale) voidsetScaleX(float scaleX) voidsetScaleY(float scaleY) Methods inherited from class Transform
addPosition, getAlpha, getPosition, getX, getY, isVisible, setAlpha, setPosition, setPosition, setVisible, setX, setY
-
Constructor Details
-
ImageTransform
public ImageTransform()
-
-
Method Details
-
setRotation
-
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
-
combine
Returns a newImageTransforminstance that is the result of combining this transform with the specified other transform. -
getRotation
-
isFlipHorizontal
public boolean isFlipHorizontal() -
isFlipVertical
public boolean isFlipVertical() -
getMaskColor
-
setFlipHorizontal
public void setFlipHorizontal(boolean flipHorizontal) -
setFlipVertical
public void setFlipVertical(boolean flipVertical) -
setMaskColor
-