From 691ddc3ca9e9eb9eb960f1f6fef2f11c96413b08 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Wed, 27 Nov 2024 10:14:13 -0500 Subject: [PATCH] Add stroke dash offset must be at end --- docs/specs/shapes.md | 6 +++++- docs/static/examples/gradient-stroke.json | 10 +++++----- docs/static/examples/stroke.json | 10 +++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/specs/shapes.md b/docs/specs/shapes.md index b05a558..793763b 100644 --- a/docs/specs/shapes.md +++ b/docs/specs/shapes.md @@ -473,7 +473,11 @@ come before them in [[stacking order]]. {schema_string:shapes/stroke-dash/description} -A stroke dash array consists of `n` dash entries, `[n-1,n]` gap entries and `[0-1]` offset entries. Dash and gap entries MUST all be in a continuous order and alternate between dash and gap, starting with dash. If there are an odd number of dashes + gaps, the sequence will repeat with dashes and gaps reversed. For example a sequence of `[4d, 8g, 16d]` MUST be rendered as `[4d, 8g, 16d, 4g, 8d, 16g]`. +A stroke dash array consists of `n` dash entries, `[n-1,n]` gap entries and `[0-1]` offset entries. + +Dash and gap entries MUST all be in a continuous order and alternate between dash and gap, starting with dash. If there are an odd number of dashes + gaps, the sequence will repeat with dashes and gaps reversed. For example a sequence of `[4d, 8g, 16d]` MUST be rendered as `[4d, 8g, 16d, 4g, 8d, 16g]`. + +Offset entry, if present, MUST be at the end of the array. {schema_object:shapes/stroke-dash} diff --git a/docs/static/examples/gradient-stroke.json b/docs/static/examples/gradient-stroke.json index de7c2a0..94d08c0 100644 --- a/docs/static/examples/gradient-stroke.json +++ b/docs/static/examples/gradient-stroke.json @@ -1187,11 +1187,6 @@ "k": 30 }, "d": [ - { - "n": "o", - "nm": "offset", - "v": {"a": 0, "k": 0} - }, { "n": "d", "nm": "dash", @@ -1201,6 +1196,11 @@ "n": "g", "nm": "gap", "v": {"a": 0, "k": 0} + }, + { + "n": "o", + "nm": "offset", + "v": {"a": 0, "k": 0} } ], "r": 1, diff --git a/docs/static/examples/stroke.json b/docs/static/examples/stroke.json index 87ee759..8e5bc66 100644 --- a/docs/static/examples/stroke.json +++ b/docs/static/examples/stroke.json @@ -130,11 +130,6 @@ "k": 30 }, "d": [ - { - "n": "o", - "nm": "offset", - "v": {"a": 0, "k": 0} - }, { "n": "d", "nm": "dash", @@ -144,6 +139,11 @@ "n": "g", "nm": "gap", "v": {"a": 0, "k": 0} + }, + { + "n": "o", + "nm": "offset", + "v": {"a": 0, "k": 0} } ] }