Hey guys. Does anyone know what is the best way to mask image with custom shape?
"layer.clip = true" I use this with image inside the layer
Thanks Tae. But I'm looking for a way to clip an SVG. As far as I know layer.clip = true just clips based on rectangle. I need something like this.
Yeah but you need layer.style and raw css: https://css-tricks.com/clipping-masking-css/
Well, if you have that SVG embedded, you can just clip your stuff using <clipPath>
Alternatively you can try embed CSS on your element with "clip-path: polygon()". But browser support of this one is limited
here's an example http://codepen.io/marioluevanos/pen/EZWKKe
If you do a search I created an example for this and posted it here In The group.
This should get you started...