Re: [svgwg] Relax SVG Path grammar with an implicite first MoveTo command (#780)

Ultimately the problem remains that the to clip a fragment you still need a point that occurs before it. But you need that point to *not* have any implied meaning. The meaning of Move is well established. It means you do not draw that length and you go to that point without a drawn operation. If I stick a move together with other path objects or fragments I get subpaths. If I completely omit it, then I do not know where I came from and if I am drawing a line from a point say (0,0) to a point (1,1) where I started is *absolutely* essential to knowing what I mean by that fragment.

Lemme offer up a little bit of potential syntax. Let's say we add a command `F` to SVG which means Fragment, Floating, From, First. That expresses the starting point for the following operations, but implies absolutely nothing about the operation itself. It functions like a move, since an operation like line-to following it would be a complete fragment of just a line operation that isn't moved to, and thus kinda floating.

Now if we revisit the initial segment problem:
* `F0,0L1,1` means `Line((0,0), (1,1))`  aka `(0,0) -Line- (1,1)`
* `L1,1` means `Line(Null, (1,1))` aka `-Line- (1,1)`
* `M0,0L1,1` means `Move((0,0)), Line((0,0), (1,1))` aka `(0,0) -Move- (0,0) -Line- (1,1)`

If we reverse these fragments:
* `F0,0L1,1` reverses to `F1,1L0,0` means `Line((1,1), (0,0))`  aka `(1,1) -Line- (0,0)`
* `L1,1` reverses to `F0,0L` means `Line((1,1), Null)` aka `(1,1) -Line-`
* `M0,0L1,1` reverses to `F1,1L0,0M0,0` means `Line((1,1), (0,0)), Move((0,0))` aka `(1,1) -Line- (0,0) -Move- (0,0)`

We would then simply `F1,1L0,0M0,0` to basically M1,1L0,0

But typically if I concatenate something with an M to my path, that's a subpath. But, if I concatenated something with an `F` to my path, that would mean that's the explicit start point to that fragment. If it does not agree with the path I'm merging with, it should be omitted (and use the current endpoint). But, this does not have a segment-meaning and does not imply that I arrived there without drawing any path segment. Just that the next command in the fragment started from that location.

-- 
GitHub Notification of comment by tatarize
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/780#issuecomment-669804185 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 6 August 2020 08:57:51 UTC