public class StateController
extends java.lang.Object
Settings object and controls some aspects of view
State, such as movement bounds restrictions
(see getEffectiveMovementArea(RectF, State)) and dynamic min / max zoom levels
(see getEffectiveMinZoom() and getEffectiveMaxZoom()).
It also provides few static methods that can be useful:
restrict() float value,interpolate() float valueinterpolate() State objectinterpolate()
State object with specified pivot point| Modifier and Type | Method and Description |
|---|---|
float |
getEffectiveMaxZoom() |
float |
getEffectiveMinZoom() |
void |
getEffectiveMovementArea(android.graphics.RectF out,
State state)
Returns area in which
State.getX() & State.getY() values can change. |
static float |
interpolate(float start,
float end,
float factor) |
static void |
interpolate(State out,
State start,
float startPivotX,
float startPivotY,
State end,
float endPivotX,
float endPivotY,
float factor)
Interpolates from start state to end state by given factor (from 0 to 1),
storing result into out state.
|
static void |
interpolate(State out,
State start,
State end,
float factor)
Interpolates from start state to end state by given factor (from 0 to 1),
storing result into out state.
|
static float |
restrict(float value,
float minValue,
float maxValue) |
public float getEffectiveMinZoom()
public float getEffectiveMaxZoom()
Settings.getMaxZoom().public void getEffectiveMovementArea(android.graphics.RectF out,
State state)
State.getX() & State.getY() values can change.
Note, that this is different than Settings.setMovementArea(int, int) which defines
part of the viewport in which image can move.out - Result will be stored in this rect.state - State for which to calculate bounds.public static float restrict(float value,
float minValue,
float maxValue)
public static void interpolate(State out, State start, State end, float factor)
public static void interpolate(State out, State start, float startPivotX, float startPivotY, State end, float endPivotX, float endPivotY, float factor)
public static float interpolate(float start,
float end,
float factor)