Documentation
    Preparing search index...

    Interface StrokeGeometryOptions

    The geometric half of §58's StrokeStyle: everything about a stroke that decides where its triangles are, and nothing about what colour they are.

    @fourjs/render's StrokeStyle is this record plus a §58 Paint, which is why the two halves have one name each rather than one type with a hole in it.

    interface StrokeGeometryOptions {
        alignment?: StrokeAlignment;
        dash?: readonly number[];
        dashOffset?: number;
        lineCap?: StrokeLineCap;
        lineJoin?: StrokeLineJoin;
        miterLimit?: number;
        tolerance: number;
        width: number;
    }
    Index
    alignment?: StrokeAlignment

    Which side of the path the band sits on; defaults to center.

    dash?: readonly number[]

    Alternating on/off lengths in world units, walked along the path (§50 "dashes and dash offset"). Omit for a solid stroke.

    An odd number of entries is repeated to make it even, SVG's rule: [4] is [4, 4]. Entries must be finite and non-negative and must not all be zero. A zero-length "on" entry draws nothing — SVG's [0, 4] dot pattern needs a lone point to become a round cap, and a lone point strokes to nothing here for the reason expandStroke states.

    dashOffset?: number

    How far into the pattern the path starts; defaults to 0. May be negative.

    lineCap?: StrokeLineCap

    How open ends are finished; defaults to butt.

    lineJoin?: StrokeLineJoin

    How corners are filled; defaults to miter.

    miterLimit?: number

    Ratio of miter length to stroke width past which a miter join is drawn as a bevel; at least 1, defaults to DEFAULT_MITER_LIMIT.

    tolerance: number

    Greatest distance a round join or cap may stray from the true arc, in world units — the same quantity Path.flatten takes.

    Required, deliberately. A default here would be a second spelling of §51's DEFAULT_FLATTEN_TOLERANCE that has to be kept equal to it by hand, and §52's module is otherwise free of any dependency on §51's; more to the point, every caller already flattened something to get the polylines it is passing, and stroking at a coarser tolerance than that flattening puts visible facets on the joins of a curve that has none.

    width: number

    Total width of the band in world units; finite and positive (§85).