public abstract class PlayFieldGraphic
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static double |
scale
Common scaling factor for all playfield graphics.
|
| Constructor and Description |
|---|
PlayFieldGraphic() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
draw(java.awt.Graphics2D g2)
Draws the graphic component to the graphics context g2
|
static double |
getScale()
Returns the currently used scaling factor
|
static double |
invScale(double value)
Performs an inverse of the scaling procedure with current scale.
|
static int |
scale(double value)
Scales the value according to current zoom level
|
static int |
scale(int value)
Scales the value according to current zoom level
|
static void |
setScale(double newScale)
Set the zooming factor of the graphics to be drawn
|
protected static double scale
setScale(double)public static void setScale(double newScale)
newScale - New scalepublic static double getScale()
public abstract void draw(java.awt.Graphics2D g2)
g2 - The context to draw the graphics topublic static int scale(double value)
value - Value to scalepublic static int scale(int value)
value - Value to scalepublic static double invScale(double value)
value - The value to inverse-scalescale(double)