Shape of negative space?

83 views
Skip to first unread message

Alex Shroyer

unread,
Aug 17, 2014, 7:57:30 PM8/17/14
to elm-d...@googlegroups.com
Is there a way to make a cutout or negative space shape? Like in Google+ my picture is cropped in the shape of a circle. Pretty sure that's some sort of CSS trick with the radius property of a div, but in Elm my thoughts tend much more high-level and I went looking for some way to specify whether a shape adds to or subtracts from an image.

Jeff Smits

unread,
Aug 18, 2014, 3:23:50 AM8/18/14
to elm-discuss

Not that I know of. Would be neat, but I'm not sure canvas and svg support that kind of operation.

On 18 Aug 2014 01:57, "Alex Shroyer" <ashr...@gmail.com> wrote:
Is there a way to make a cutout or negative space shape? Like in Google+ my picture is cropped in the shape of a circle. Pretty sure that's some sort of CSS trick with the radius property of a div, but in Elm my thoughts tend much more high-level and I went looking for some way to specify whether a shape adds to or subtracts from an image.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Do Bi

unread,
Aug 18, 2014, 11:04:46 AM8/18/14
to elm-d...@googlegroups.com
I think it would be cool to be able to combine an image and a grayscale transparency mask. Feature request? :D

Dobes Vandermeer

unread,
Aug 18, 2014, 1:03:12 PM8/18/14
to elm-d...@googlegroups.com
You can do it in canvas, although it kind of only works for cropping, not so much for an arbitrary alpha channel:


Sometimes just stamping a bit of a frame/shadow on top of the image after the composition operation will give the desired effect.
Reply all
Reply to author
Forward
0 new messages