Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subtract (mask away?) a path by a circle shape

I'm drawing a path in Flex using Spark:Path.

I want to subtract a circle shape from this path, as in the following image:

enter image description here

(The path is black and wide)

Any ideas?

I tried creating a mask using a Shape object but couldn't quite manage to create a mask that has a circular hole in it.

like image 973
Assaf Lavie Avatar asked Dec 21 '25 11:12

Assaf Lavie


1 Answers

Found it.

No masks involved.

I took the Path and wrapped a Group around it:

<s:Group blendMode="layer">
    <s:Path id="connector" ... />
    <s:Ellipse id="hole" blendMode="erase">

I set the blendMode to "layer" and added an ellipse after the path with blendMode erase

like image 175
Assaf Lavie Avatar answered Dec 24 '25 08:12

Assaf Lavie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!