Package com.anylogic.engine
- java.lang.Object
-
- com.anylogic.engine.Scale
- All Implemented Interfaces:
java.io.Serializable
public class Scale
extends java.lang.Object
implements java.io.Serializable
- See Also:
- Serialized Form
static Scale |
DEFAULT_SCALE |
|
Modifier and Type | Field | Description |
---|
Scale(double pixelsPerMeter) |
|
Constructor | Description |
---|
double |
pixelsPerUnit(LengthUnits unit) |
Returns the number of pixels corresponding to one given unit,
according to the scaling settings of this objects
|
double |
toLengthUnits(double lengthInPixels,
LengthUnits units) |
Converts the given pixel length to the length units
|
double |
toPixels(double lengthInUnits,
LengthUnits units) |
Converts the length in the given length units to pixels
|
Modifier and Type | Method | Description |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final Scale DEFAULT_SCALE
public Scale(double pixelsPerMeter)
public double pixelsPerUnit(LengthUnits unit)
Returns the number of pixels corresponding to one given unit,
according to the scaling settings of this objects
public double toLengthUnits(double lengthInPixels, LengthUnits units)
Converts the given pixel length to the length units
- Parameters:
lengthInPixels
- the length in pixels (in the scope of underlying agent which acts as 'Space')units
- length units- Returns:
- result in length units
public double toPixels(double lengthInUnits, LengthUnits units)
Converts the length in the given length units to pixels
- Parameters:
lengthInUnits
- the length inunits
units
- length units- Returns:
- result in pixels (in the scope of underlying agent which acts as 'Space')
-
How can we improve this article?
-