减(屏蔽了吗?)的路径由一个圆形 [英] Subtract (mask away?) a path by a circle shape

查看:121
本文介绍了减(屏蔽了吗?)的路径由一个圆形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用星火绘制Flex中的路径:路径

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:

(该路径是黑色和宽)

任何想法?

我试图用一个图形对象创建一个面具,但不能完全管理,以创建具有一个圆形的洞,这面具。

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.

推荐答案

找到了。

没有面具参与。

我把路径包裹一个集团它周围的:

I took the Path and wrapped a Group around it:

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

我设置了​​ blendMode 来层,并增加了一个椭圆形的的与blendMode路径删除

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

这篇关于减(屏蔽了吗?)的路径由一个圆形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆