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

    • Method Detail

      • 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.
      • 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.