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.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Callback to track polygon animation during rotations.

Link copied to clipboard

Callback to track the changing of the state of the polygon selection.

Link copied to clipboard

Callback to track the change of the state of dragging.

Properties

Link copied to clipboard

Get Drawable from image view.

Link copied to clipboard
Link copied to clipboard

Control whether view is in editMode eg. points draggable.

Link copied to clipboard

Polygon with 4 points and coordinates from 0 to 1. This polygon is used as source and output for document coordinated. corners and edges are calculated from it to increase performance.

Functions

Link copied to clipboard
open override fun onTouchEvent(event: MotionEvent): Boolean
Link copied to clipboard

Rotates view clockwise.

Link copied to clipboard

Rotates view counterclockwise.

Link copied to clipboard

Sets anchor points color.

Link copied to clipboard
fun setEdgeColor(color: Int)

Sets edge color.

Link copied to clipboard

Sets edge color on line.

Link copied to clipboard
fun setEdgeWidth(width: Float)

Sets edge width in pixels.

Link copied to clipboard

Sets listener which will be invoked when animation will be finished.

Link copied to clipboard

Sets listener which will be invoked when the state of the polygon selection changes.

Link copied to clipboard

Sets the listener which helps to track the change of the state of dragging.

Link copied to clipboard
fun setImageBitmap(bitmap: Bitmap?)

Set bitmap to the image view.

Link copied to clipboard
fun setLines(horizontalLines: List<LineSegmentFloat>, verticalLines: List<LineSegmentFloat>)

Sets detected horizontal and vertical lines.

Link copied to clipboard
fun setMagnifier(magnifier: MagnifierView?)
Link copied to clipboard
open override fun setRotation(rotation: Float)
Link copied to clipboard
fun setRotationAnimated(rotation: Float)