public class PolygonView
Draws polygon
@JvmField @NotNull protected java.util.List<? extends android.graphics.PointF> polygon
@JvmField @NotNull public io.scanbot.sdk.contourdetector.ContourDetectorFrameHandler.ResultHandler contourDetectorResultHandler
public PolygonView(@NotNull
android.content.Context context)
public PolygonView(@NotNull
android.content.Context context,
@Nullable
android.util.AttributeSet attrs)
public boolean getAutoSnapProgressEnabled()
public void setAutoSnapProgressEnabled(boolean value)
protected void onAttachedToWindow()
protected void onDetachedFromWindow()
public void onAutoSnappingCanceled()
public void onAutoSnappingIn(long ms)
public void setFillColor(@ColorInt
int fillColor)
Changes fill color of the polygon
fillColor - color to fill polygon with. Alpha channel is supported.public void setDrawShadows(boolean drawShadows)
Enable shadows under the polygon stroke if poly fill is transparent.
drawShadows - enable shadow if true, disable otherwisepublic void setFillColorOK(@ColorInt
int fillColorOK)
Changes fill color of the polygon when result is OK
fillColorOK - color to fill polygon with. Alpha channel is supported.public void setStrokeColor(@ColorInt
int strokeColor)
Changes stroke color of the polygon.
strokeColor - color to draw lines with. Alpha channel is supported.public void setAutoSnappingProgressStrokeColor(@ColorInt
int strokeColor)
Changes stroke color of the polygon animated progress line.
strokeColor - color to draw lines with. Alpha channel is supported.public void setStrokeColorOK(@ColorInt
int strokeColorOK)
Changes stroke color of the polygon when result is OK.
strokeColorOK - color to draw lines with. Alpha channel is supported.public void setStrokeWidth(@Px
int strokeWidth)
Changes width of the stroke of the polygon.
strokeWidth - width of the stroke in pixels.public void setAutoSnappingProgressStrokeWidth(@Px
int strokeWidth)
Changes width of the stroke of the autosnapping animated polygon.
strokeWidth - width of the stroke in pixels.public void setCornerRadius(@Px
int cornerRadius)
Changes the radius of corners of the polygon
cornerRadius - radius of corners in pixels.protected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
protected void updatePolygon(@NotNull
io.scanbot.sdk.core.contourdetector.DetectionResult detectionResult,
int frameOrientation,
@NotNull
java.util.List<? extends android.graphics.PointF> polygon)
@NotNull public java.util.List<androidx.dynamicanimation.animation.SpringAnimation> getAnimators()
public void setAnimators(@NotNull
java.util.List<androidx.dynamicanimation.animation.SpringAnimation> p)
protected void onDraw(@NotNull
android.graphics.Canvas canvas)