- From: herrstrietzel via GitHub <sysbot+gh@w3.org>
- Date: Tue, 19 Nov 2024 07:48:14 +0000
- To: public-svg-issues@w3.org
herrstrietzel has just created a new issue for https://github.com/w3c/svgwg: == ‘stroke-align’ property issues: why not adapt graphic apps behavior? == Dear working group, I came across some Issues/annotations about the `stroke-alignment` or `stroke-align` property descibed in the spec/draft documentations (sorry I'm not sure if I got the latest revisions). Frankly, I wonder why SVG shouldn't adopt the "defacto standard" behaviour of graphics applications like Adobe Illustrator - as it was established ~ in the late 90s. (Actually, most other applications also use the same logic to handle stroke alignments). This is an highly anticipated feature and a behavior deviating from the common graphic application concepts would both: * confuse most devs/designers also using these applications for complex SVG creation (maybe also switching between coding and graphic editing context) * complicate application implementation for developers/vendors for a consistent SVG stroke align export and import I'm referring to these sections: > [Issue 5:](https://www.w3.org/TR/svg-strokes/#issue5) How does this apply to open path segments? How are end caps handled? Just **ignore stroke-alignment** completely, since there is no "inner" side of an open path. In the aforementioned apps you won't be able to change the alignment setting ![image](https://github.com/user-attachments/assets/b7addb12-6ff0-4a81-a3ac-669549ade4a3) > How are dashes handled? Are they based on original path? ![image](https://github.com/user-attachments/assets/16bea540-8f3b-49de-9930-7ded3335e47d) The same should apply to stroked dashes if they are open - ignore stroke alignment > How does this apply to paths with loops? Is the region inside the red circle in the below figure part of the stroked (as shown)? Are internal edges stroked if the fill rule is 'nonzero'; if so how? (Shown without stroking below.) The *exspected* result would be similar to a masked stroke with fill-rule even-odd applied ![image](https://github.com/user-attachments/assets/1996d8f9-2168-4de1-b75d-2e58ea55e89d) So all in all: **center(default)** ![image](https://github.com/user-attachments/assets/407d2492-bde4-466e-adf0-0d24a9bbb4fe) **inner** ![image](https://github.com/user-attachments/assets/7ebf020a-4516-4bca-9764-f356512c91ea) **outer** ![image](https://github.com/user-attachments/assets/967a27e0-f52f-4858-a355-b4cf63d23e9c) The above screenshots come from my [testbed on codepen](https://codepen.io/herrstrietzel/pen/rNXgGdX?editors=1010) with a polyfill-like helper. They replicate quite accurately the expected behavior from Adobe Illustrator, Affinity Designer, Figma etc. Sorry, if I missed something. [](https://svgwg.org/specs/strokes/#SpecifyingStrokeAlignment) [2.2. Specifying stroke alignment: the ‘stroke-alignment’ property](https://www.w3.org/TR/svg-strokes/#SpecifyingStrokeAlignment) Please view or discuss this issue at https://github.com/w3c/svgwg/issues/957 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 19 November 2024 07:48:15 UTC