-
Notifications
You must be signed in to change notification settings - Fork 28
ShapesAndMasks.md
Old bug for shape and mask support brainstorming
HTML canvases can do globalCompositeOperation. So one possibility would be an HTML canvas-based implementation. But then we'd need to know how to draw every drawable into a canvas. Possible, but a ton of work.
SVG supports a mask type as well, but again, we can't draw everything in SVG. We may want to only support some drawables as masks? But it'll have to include things like text. This is potentially pretty hard. Maybe easier than canvas, since a lot of the relevant shapes already use SVG?
Right out (Nov 2023) our positioning is also lousy. We make a separate SVG object for each drawable, which isn't the right thing in Shoes terms. Maybe the SVG objects get attached to slots? But right now, our positioning isn't Shoes-correct.
CSS has a mask property too, but it uses an image as the mask. So if we could draw into an image, that would allow using the CSS mask property. But then we'd have to draw into an image, which isn't easy yet either.