/** * Path Stroker * * Converts a path outline into a stroked outline that can be filled. * Based on FreeType's ftstroke.c algorithm. * * The stroker generates two borders (inside and outside) by offsetting * the original path by half the stroke width in both directions. */ import type { GlyphPath } from "../render/path.ts"; /** Line cap styles */ export type LineCap = "butt" | "round" | "square"; /** Line join styles */ export type LineJoin = "miter" | "round" | "bevel"; /** Stroker options */ export interface StrokerOptions { /** Stroke width in font units */ width: number; /** Line cap style (default: "butt") */ lineCap?: LineCap; /** Line join style (default: "miter") */ lineJoin?: LineJoin; /** Miter limit for miter joins (default: 4) */ miterLimit?: number; } /** * Stroke a glyph path, producing a new path that represents the stroked outline * @param path Input glyph path to stroke * @param options Stroke parameters (width, cap style, join style, miter limit) * @returns New path representing the stroked outline that can be filled */ export declare function strokePath(path: GlyphPath, options: StrokerOptions): GlyphPath;