public class PcZoomHandler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
PcZoomHandler.ZoomListener
Interface definition for callbacks to be invoked when the two-finger pinch zoom status has changed.
|
Constructor and Description |
---|
PcZoomHandler(PcTouchListener touchHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
onTouch(View view,
MotionEvent event)
Perform two-finger pinch zoom and swipe based on the gesture.
|
void |
resetZoom()
Reset the zoom of the render view.
|
void |
setZoomListener(PcZoomHandler.ZoomListener listener)
Set the two-finger pinch zoom listener.
|
void |
setZoomOffset(Rect rect)
Set the offsets of the video image frame during zoom.
|
void |
setZoomRatio(float min,
float max)
Set zoom ratio.
|
public PcZoomHandler(PcTouchListener touchHandler)
public void setZoomRatio(float min, float max)
min
- The minimum zoom ratio, which must be greater than 0.max
- The maximum zoom ratio, which must be greater than 1.public void resetZoom()
public void setZoomOffset(Rect rect)
rect
- The size of the area within which the video image can slide out of the four borders of the
phone screen. The coordinates are all `0` by default.public void setZoomListener(PcZoomHandler.ZoomListener listener)
listener
- the listener to be set.public boolean onTouch(View view, MotionEvent event)
view
- The view to be zoomedevent
- The current touch operation