skia
    Preparing search index...

    Interface PathEffectFactory

    See SkPathEffect.h for more details.

    interface PathEffectFactory {
        MakeCorner(radius: number): PathEffect | null;
        MakeDash(intervals: number[], phase?: number): PathEffect;
        MakeDiscrete(
            segLength: number,
            dev: number,
            seedAssist: number,
        ): PathEffect;
        MakeLine2D(width: number, matrix: InputMatrix): PathEffect | null;
        MakePath1D(
            path: Path,
            advance: number,
            phase: number,
            style: EmbindEnumEntity,
        ): PathEffect | null;
        MakePath2D(matrix: InputMatrix, path: Path): PathEffect | null;
    }
    Index

    Methods

    • Returns a PathEffect that can turn sharp corners into rounded corners.

      Parameters

      • radius: number

        if <=0, returns null

      Returns PathEffect | null

    • Returns a PathEffect that add dashes to the path.

      See SkDashPathEffect.h for more details.

      Parameters

      • intervals: number[]

        even number of entries with even indicies specifying the length of the "on" intervals, and the odd indices specifying the length of "off".

      • Optionalphase: number

        offset length into the intervals array. Defaults to 0.

      Returns PathEffect

    • Returns a PathEffect that breaks path into segments of segLength length, and randomly move the endpoints away from the original path by a maximum of deviation.

      Parameters

      • segLength: number

        length of the subsegments.

      • dev: number

        limit of the movement of the endpoints.

      • seedAssist: number

        modifies the randomness. See SkDiscretePathEffect.h for more.

      Returns PathEffect

    • Returns a PathEffect that will fill the drawing path with a pattern made by applying the given matrix to a repeating set of infinitely long lines of the given width. For example, the scale of the provided matrix will determine how far apart the lines should be drawn its rotation affects the lines' orientation.

      Parameters

      Returns PathEffect | null

    • Returns a PathEffect which implements dashing by replicating the specified path.

      Parameters

      • path: Path

        The path to replicate (dash)

      • advance: number

        The space between instances of path

      • phase: number

        distance (mod advance) along path for its initial position

      • style: EmbindEnumEntity

        how to transform path at each point (based on the current position and tangent)

      Returns PathEffect | null

    • Returns a PathEffect that will fill the drawing path with a pattern by repeating the given path according to the provided matrix. For example, the scale of the matrix determines how far apart the path instances should be drawn.

      Parameters

      Returns PathEffect | null