diff --git a/.gitignore b/.gitignore index ef0c99f..5f658e7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ __pycache__ node_modules path venv +.venv # Operating system .DS_Store \ No newline at end of file diff --git a/docs/specs/shapes.md b/docs/specs/shapes.md index cdf39d0..793763b 100644 --- a/docs/specs/shapes.md +++ b/docs/specs/shapes.md @@ -473,6 +473,12 @@ 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]`. + +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} } ] }