Package io.scanbot.sdk.ui
Class PolygonView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.accessibility.AccessibilityEventSource
,io.scanbot.sdk.camera.autosnapping.IAutoSnappingController.AutoSnappingStateListener
,io.scanbot.sdk.ui.BasePolygonView
public class PolygonView extends View implements BasePolygonView, IAutoSnappingController.AutoSnappingStateListener
Draws polygon
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
autoSnapProgressEnabled
public ContourDetectorFrameHandler.ResultHandler
contourDetectorResultHandler
private List<<Error class: unknown class>>
animators
-
Constructor Summary
Constructors Constructor Description PolygonView(Context context)
PolygonView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description final Boolean
getAutoSnapProgressEnabled()
final Unit
setAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)
final List<<Error class: unknown class>>
getAnimators()
final Unit
setAnimators(List<<Error class: unknown class>> animators)
Unit
onAutoSnappingCanceled()
Triggers when autosnapping won't start within this delay Unit
onAutoSnappingIn(Long ms)
Triggers when autosnapping will start in within delay Unit
onAutoSnappingFinished()
Triggers when autosnapping is finished (it happens when camera returns taken picture) final Unit
setFillColor(Integer fillColor)
Changes fill color of the polygon final Unit
setDrawShadows(Boolean drawShadows)
Enable shadows under the polygon stroke if poly fill is transparent. final Unit
setFillColorOK(Integer fillColorOK)
Changes fill color of the polygon when result is OK final Unit
setStrokeColor(Integer strokeColor)
Changes stroke color of the polygon. final Unit
setAutoSnappingProgressStrokeColor(Integer strokeColor)
Changes stroke color of the polygon animated progress line. final Unit
setStrokeColorOK(Integer strokeColorOK)
Changes stroke color of the polygon when result is OK. final Unit
setStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the polygon. final Unit
setAutoSnappingProgressStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the autosnapping animated polygon. final Unit
setCornerRadius(Integer cornerRadius)
Changes the radius of corners of the polygon -
-
Constructor Detail
-
PolygonView
PolygonView(Context context)
-
PolygonView
PolygonView(Context context, AttributeSet attrs)
-
-
Method Detail
-
getAutoSnapProgressEnabled
final Boolean getAutoSnapProgressEnabled()
-
setAutoSnapProgressEnabled
final Unit setAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)
-
getAnimators
final List<<Error class: unknown class>> getAnimators()
-
setAnimators
final Unit setAnimators(List<<Error class: unknown class>> animators)
-
onAutoSnappingCanceled
Unit onAutoSnappingCanceled()
Triggers when autosnapping won't start within this delay
-
onAutoSnappingIn
Unit onAutoSnappingIn(Long ms)
Triggers when autosnapping will start in within delay
- Parameters:
ms
- delay in milliseconds
-
onAutoSnappingFinished
Unit onAutoSnappingFinished()
Triggers when autosnapping is finished (it happens when camera returns taken picture)
-
setFillColor
final Unit setFillColor(Integer fillColor)
Changes fill color of the polygon
- Parameters:
fillColor
- color to fill polygon with.
-
setDrawShadows
final Unit setDrawShadows(Boolean drawShadows)
Enable shadows under the polygon stroke if poly fill is transparent.
- Parameters:
drawShadows
- enable shadow if true, disable otherwise
-
setFillColorOK
final Unit setFillColorOK(Integer fillColorOK)
Changes fill color of the polygon when result is OK
- Parameters:
fillColorOK
- color to fill polygon with.
-
setStrokeColor
final Unit setStrokeColor(Integer strokeColor)
Changes stroke color of the polygon.
- Parameters:
strokeColor
- color to draw lines with.
-
setAutoSnappingProgressStrokeColor
final Unit setAutoSnappingProgressStrokeColor(Integer strokeColor)
Changes stroke color of the polygon animated progress line.
- Parameters:
strokeColor
- color to draw lines with.
-
setStrokeColorOK
final Unit setStrokeColorOK(Integer strokeColorOK)
Changes stroke color of the polygon when result is OK.
- Parameters:
strokeColorOK
- color to draw lines with.
-
setStrokeWidth
final Unit setStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the polygon.
- Parameters:
strokeWidth
- width of the stroke in pixels.
-
setAutoSnappingProgressStrokeWidth
final Unit setAutoSnappingProgressStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the autosnapping animated polygon.
- Parameters:
strokeWidth
- width of the stroke in pixels.
-
setCornerRadius
final Unit setCornerRadius(Integer cornerRadius)
Changes the radius of corners of the polygon
- Parameters:
cornerRadius
- radius of corners in pixels.
-
-
-
-