public class StateController
extends java.lang.Object
Settings object and controls some aspects of view
State, such as movement bounds restrictions
(see getMovementArea(State, RectF)) and dynamic min / max zoom levels
(see getMinZoom(State) and getMaxZoom(State)).| Modifier and Type | Method and Description |
|---|---|
float |
applyZoomPatch(float zoom) |
void |
applyZoomPatch(State state) |
float |
getFitZoom(State state) |
float |
getMaxZoom(State state) |
float |
getMinZoom(State state) |
void |
getMovementArea(State state,
android.graphics.RectF out)
Calculates area in which
State.getX() & State.getY() values can change. |
void |
setTempZoomPatch(float factor) |
public void setTempZoomPatch(float factor)
public void applyZoomPatch(@NonNull
State state)
public float applyZoomPatch(float zoom)
public float getMinZoom(@NonNull
State state)
state - Current statepublic float getMaxZoom(@NonNull
State state)
state - Current stateSettings.getMaxZoom().public float getFitZoom(@NonNull
State state)
state - Current stateSettings.getFitMethod() is Settings.Fit.NONE).public void getMovementArea(@NonNull
State state,
@NonNull
android.graphics.RectF out)
State.getX() & State.getY() values can change.
Note, that this is different from Settings.setMovementArea(int, int) which defines
part of the viewport in which image can move.state - Current stateout - Output movement area rectangle