StrokeDrawScope


public final class StrokeDrawScope


A utility to simplify usage of CanvasStrokeRenderer by automatically calculating the strokeToCanvasTransform parameter of CanvasStrokeRenderer.draw. Obtain an instance of this class using androidx.ink.rendering.android.view.ViewStrokeRenderer, if using android.view.View. Use this scope by calling its drawStroke function.

Summary

Public methods

final void

Draw the given Stroke to the Canvas represented by this scope.

Public methods

drawStroke

Added in 1.0.0-alpha01
public final void drawStroke(@NonNull Stroke stroke)

Draw the given Stroke to the Canvas represented by this scope.