MediaPipeTasksVision Framework Reference

Stroke

class Stroke: NSObject

Represents a single user-drawn stroke for interactive segmentation.

  • Initializes a new Stroke with the given points, brush mode, and completion status.

    Declaration

    Swift

    init(points: [NormalizedKeypoint], brushMode: BrushMode, isCompleted: Bool)

    Parameters

    points

    The sequence of normalized key points forming the stroke.

    brushMode

    The brush mode used for this stroke.

    isCompleted

    Whether the stroke is complete.

    Return Value

    An instance of Stroke initialized with the given parameters.

  • The brush mode used for this stroke.

    Declaration

    Swift

    var brushMode: BrushMode { get }
  • Whether the stroke is complete.

    Declaration

    Swift

    var isCompleted: Bool { get }
  • The sequence of normalized key points forming the stroke.

    Declaration

    Swift

    var points: [NormalizedKeypoint] { get }