@mocanvas/mocanvas · function

getHatchRgba

declare function getHatchRgba(color: DefaultColorStyle, fill: DefaultFillStyle, colors?: TLThemeColors): number

Engine RGBA for a fill style's hatch, or 0 when that style has no hatch.

Separate from getFillRgba because a hatched shape has both: paper underneath and lines over it. Reading one colour for the pair is what made pattern a flat block of the hatch's own stroke colour.

Mentioned here

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.