Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SVGGeometryElement interface from <mesh>? #310

Closed
BigBadaboom opened this issue Mar 31, 2017 · 3 comments
Closed

Remove SVGGeometryElement interface from <mesh>? #310

BigBadaboom opened this issue Mar 31, 2017 · 3 comments

Comments

@BigBadaboom
Copy link
Contributor

https://svgwg.org/svg2-draft/single-page.html#shapes-InterfaceSVGMeshElement

SVGMeshElement is currently defined as supporting the SVGGeometryElement interface. However it is not obvious how most of the methods of SVGGeometryElement would apply to a mesh.

What is the equivalent path of a mesh? The concatenation of all the stop paths? That doesn't seem useful.

The only method of this interface that might be useful is isPointInFill(). But the rest of the members of the interface (pathLength, isPointInStroke, getTotalLength(), getPointAtLength()) do not make sense for a mesh.

If it were to keep SVGGeometryElement, then I think we need to define the behaviour of these other functions. Otherwise I think SVGMeshElement should be switched to SVGGraphicsElement instead.

@BigBadaboom BigBadaboom changed the title Remove SVGGeomertyElement interface from <mesh>? Remove SVGGeometryElement interface from <mesh>? Mar 31, 2017
@AmeliaBR
Copy link
Contributor

Hi Paul,

The equivalent path of a <mesh> is the outer edge of the mesh grid, it is defined here:
https://www.w3.org/TR/SVG2/shapes.html#MeshElement

All the other methods can be derived once you have the path. A <mesh> is a shape element that defines both its fill and its path from the referenced <meshgradient>.

@BigBadaboom
Copy link
Contributor Author

Hmm.. Sorry. The only explanation I have is that I must have been viewing an old version of the spec, or was stuck in the meshgradient section. :/

@AmeliaBR
Copy link
Contributor

AmeliaBR commented Apr 1, 2017

No problem. It was a topic we discussed a lot last year, and the spec did change a few times. Trying to create sensible interface inheritance was the main reason we split meshes into two elements, one for the paint server (meshgradient) and one for the actual shape (mesh).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants