Package com.macrofocus.transform
Class SimpleOneDScreenTransform
java.lang.Object
com.macrofocus.transform.AbstractMutableOneDScreenTransform
com.macrofocus.transform.SimpleOneDScreenTransform
- All Implemented Interfaces:
MutableOneDScreenTransform,OneDScreenTransform
Default implementation of a OneDScreenTransform.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleOneDScreenTransform(BoundedInterval world, int screenSize) SimpleOneDScreenTransform(BoundedInterval world, int screenSize, boolean invertDeviceCoordinates, boolean invertWorldCoordinates) -
Method Summary
Modifier and TypeMethodDescriptionintdoubledoubledoublebooleanisAffine()booleandoublescreenToWorld(int screen) voidsetScreenMargins(int screenMargins) voidsetScreenSize(int screenSize) voidsetWorldInterval(BoundedInterval world) toString()intworldToScreen(double world) doubleworldToScreenPrecise(double world) Methods inherited from class com.macrofocus.transform.AbstractMutableOneDScreenTransform
addScreenTransformListener, addWeakScreenTransformListener, notifyTransformChanged, removeScreenTransformListener, removeScreenTransformListeners
-
Constructor Details
-
SimpleOneDScreenTransform
-
SimpleOneDScreenTransform
public SimpleOneDScreenTransform(BoundedInterval world, int screenSize, boolean invertDeviceCoordinates, boolean invertWorldCoordinates)
-
-
Method Details
-
screenToWorld
public double screenToWorld(int screen) -
worldToScreen
public int worldToScreen(double world) -
worldToScreenPrecise
public double worldToScreenPrecise(double world) -
getWorldInterval
-
setWorldInterval
-
getScreenSize
public int getScreenSize() -
isAffine
public boolean isAffine() -
getWorldMin
public double getWorldMin() -
getWorldMax
public double getWorldMax() -
getWorldRange
public double getWorldRange() -
isWorldCoordinatesInverted
public boolean isWorldCoordinatesInverted() -
setScreenSize
public void setScreenSize(int screenSize) -
setScreenMargins
public void setScreenMargins(int screenMargins) -
toString
-