public abstract class AbstractTransform
extends java.lang.Object
AbstractTransform
class holds a generic context for all kinds of transformations (see sub classes).Constructor and Description |
---|
AbstractTransform() |
Modifier and Type | Method and Description |
---|---|
int |
getAlpha()
Returns the current opacity.
|
int |
getTranslateX()
Returns the current x translation.
|
int |
getTranslateY()
Returns the current y translation.
|
boolean |
isMirrored()
Returns
true if vertical mirror is enabled. |
void |
resetAlpha()
Restore the opacity to its default value (
GraphicsContext.OPAQUE ). |
void |
resetTranslate()
Resets translation (
(0,0) ). |
void |
setAlpha(int alpha)
Specifiy the global opacity to apply on drawing.
|
void |
setMirror(boolean applyMirror)
Apply a vertical mirror on source image before drawing it.
|
void |
translate(int x,
int y)
Translates the transformation origin with the given vector
(x,y) . |
public void setAlpha(int alpha)
Image
to draw.GraphicsContext.OPAQUE
.alpha
- the opacitypublic void resetAlpha()
GraphicsContext.OPAQUE
).public int getAlpha()
public void setMirror(boolean applyMirror)
applyMirror
- enable or not vertical mirror.public boolean isMirrored()
true
if vertical mirror is enabled.public void translate(int x, int y)
(x,y)
. Subsequent rendering operations on
a GraphicsContext
will be relative to the new origin (in addition of GraphicsContext
's
translation.x
- the translation for the x coordinatey
- the translation for the y coordinatepublic void resetTranslate()
(0,0)
).public int getTranslateX()
public int getTranslateY()