public class EditPolygonImageView
Shows image of document and polygon, which contains document coordinates with ability to change polygon corners and edges Magnifier is shown when polygon corners are moved
public EditPolygonImageView(@NotNull
android.content.Context context,
@Nullable
android.util.AttributeSet attrs)
Shows image of document and polygon, which contains document coordinates with ability to change polygon corners and edges Magnifier is shown when polygon corners are moved
public boolean isPointsDraggable()
Control whether view is in editMode eg. points draggable
public void setPointsDraggable(boolean p)
Control whether view is in editMode eg. points draggable
@NotNull public java.util.List<android.graphics.PointF> getPolygon()
public void setPolygon(@NotNull
java.util.List<? extends android.graphics.PointF> newPolygon)
public boolean getFullPolygonSelected()
public void setFullPolygonSelected(boolean p)
protected void onAttachedToWindow()
protected void onDetachedFromWindow()
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
protected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
public void setRotation(float rotation)
public void setLines(@NotNull
java.util.List<io.scanbot.sdk.core.contourdetector.Line2D> horizontalLines,
@NotNull
java.util.List<io.scanbot.sdk.core.contourdetector.Line2D> verticalLines)
Sets detected horizontal and vertical lines
horizontalLines - verticalLines - public void setEdgeColor(int color)
Sets edge color
color - The new color (including alpha) to set in the paint.public void setEdgeColorOnLine(int color)
Sets edge color on line
color - The new color (including alpha) to set in the paint.public void setEdgeWidth(float width)
Sets edge width in pixels
width - set the paint's stroke width.public void rotateClockwise()
Rotates view clockwise
public void rotateCounterClockwise()
Rotates view counterclockwise
protected void dispatchDraw(@NotNull
android.graphics.Canvas canvas)
public boolean onTouchEvent(@NotNull
android.view.MotionEvent event)
public void setMagnifier(@Nullable
MagnifierView magnifier)
magnifier - which will be notified when image should be "magnified".public void setEditPolygonAnimationEndListener(@Nullable
io.scanbot.sdk.ui.EditPolygonImageView.EditPolygonAnimationEndListener editPolygonAnimationEndListener)
sets listener which will be invoked when animation will be finished
editPolygonAnimationEndListener - public void setEditPolygonDragListener(@Nullable
io.scanbot.sdk.ui.EditPolygonImageView.EditPolygonDragListener editPolygonDragListener)
sets listener which will be invoked when drag ends
editPolygonDragListener - public void <no name provided>()
Callback to track polygon animation during rotations
public void <no name provided>()
Callback to track the changing of the state of the polygon selection
@NotNull public static java.util.List<android.graphics.PointF> getDefaultPolygon()