Skip to content

cupertino-files / writeStroke

Function: writeStroke() ​

writeStroke(stroke): RawMessage

Defined in: src/tsd/style.ts:369

Every app-written stroke states cap, join, miter limit and a complete pattern message — measured over all 9,493 strokes at every site the corpus has one: paragraph borders, table band strokes, the cell-border stroke sidecar, chart gridlines and legend outlines, shape and media outlines. Cap 0, join 0, miter 4 is the shape on 8,992 of them; the rest are styles' own round caps and joins and a few miter-8 gridlines, so the defaults here are the app's dominant shape and an explicit cap or join is honoured. The pattern message is always whole: phase 0, the run count, and the float list padded to six — solid and empty state count 0 with six zeros, a dashed border states its dashes and zero-fill. A stroke stating only type renders as no border: the app shows the width but "None" for the stroke, draws nothing, and zeroes border_positions on resave. A stroke given without a pattern is written solid, because the app writes no stroke without one and fills an absent pattern with an empty dash list on resave. The dash presets are the apps' own (DASH_PRESETS), a dotted stroke round-capped and round-joined as the app writes its dotted paragraph border, unless a cap or join is given.

Parameters ​

stroke ​

Stroke

Returns ​

RawMessage

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.