|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.zoom.PanZoomControl
public class PanZoomControl
Main class for controlling the physics of the pan-zoom-view
Field Summary | |
---|---|
static float |
DAMPING_RATIO
damping ratio of the spring |
static float |
FRICTION_FACTOR
friction factor for the dynamics |
static float |
MAX_ZOOM
maximum possible zoom |
static float |
MIN_ZOOM
minimum possible zoom |
static float |
STIFFNESS
stiffness for dynamics |
Constructor Summary | |
---|---|
PanZoomControl(PanZoomView pzv)
Constructor |
Method Summary | |
---|---|
boolean |
isMinimumZoom()
Checks whether the current zoom is minimum or not |
void |
pan(float dx,
float dy)
Pan the current image |
void |
resetState()
Resets the view to the original state |
void |
startFling(float velx,
float vely)
Starts the fling action |
void |
stopFling()
Stops the previously started fling action |
void |
updateState()
Update the state of the controller |
void |
zoom(float z,
int z_mode)
Apply zoom onto the image |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float MIN_ZOOM
public static final float MAX_ZOOM
public static final float FRICTION_FACTOR
public static final float DAMPING_RATIO
public static final float STIFFNESS
Constructor Detail |
---|
public PanZoomControl(PanZoomView pzv)
Method Detail |
---|
public void updateState()
public void resetState()
public boolean isMinimumZoom()
public void zoom(float z, int z_mode)
z
- zoom-factor to applymode
- zoom-in or zoom-out?public void pan(float dx, float dy)
dx
- pan-amount along X-axisdy
- pan-amount along Y-axispublic void startFling(float velx, float vely)
velx
- velocity along X-axisvely
- velocity along Y-axispublic void stopFling()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |