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 BooleanautoSnapProgressEnabledpublic DocumentScannerFrameHandler.ResultHandlerdocumentScannerResultHandlerprivate 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 BooleangetAutoSnapProgressEnabled()final UnitsetAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)final List<<Error class: unknown class>>getAnimators()final UnitsetAnimators(List<<Error class: unknown class>> animators)UnitonAutoSnappingCanceled()Triggers when autosnapping won't start within this delay UnitonAutoSnappingIn(Long ms)Triggers when autosnapping will start in within delay UnitonAutoSnappingFinished()Triggers when autosnapping is finished (it happens when camera returns taken picture) final UnitsetFillColor(Integer fillColor)Changes fill color of the polygon final UnitsetDrawShadows(Boolean drawShadows)Enable shadows under the polygon stroke if poly fill is transparent. final UnitsetFillColorOK(Integer fillColorOK)Changes fill color of the polygon when result is OK final UnitsetStrokeColor(Integer strokeColor)Changes stroke color of the polygon. final UnitsetAutoSnappingProgressStrokeColor(Integer strokeColor)Changes stroke color of the polygon animated progress line. final UnitsetStrokeColorOK(Integer strokeColorOK)Changes stroke color of the polygon when result is OK. final UnitsetStrokeWidth(Integer strokeWidth)Changes width of the stroke of the polygon. final UnitsetAutoSnappingProgressStrokeWidth(Integer strokeWidth)Changes width of the stroke of the autosnapping animated polygon. final UnitsetCornerRadius(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.
-
-
-
-