As described in another post https://stackoverflow.com/questions/17003171/how-to-identify-which-clip-paths-apply-to-a-path-or-fill-in-pdf-vector-graphics/17021865, I am trying to recreate an SVG from vector graphics commands in a PDF and I am facing some difficulty in the part where I need to intersect a set of clip paths. For instance, the raw SVG http://pastebin.com/WSyG30ft has a few clip path elements line #16 which need to be intersected and applied on the rectangle fill (line #17) to obtain what looks like this: .
我不清楚在 SVG 中实现多个剪辑路径相交的正确和最佳方法。我在网上找不到太多关于此的信息,除了this one http://apike.ca/prog_svg_clip.html,按照我想出的this SVG http://pastebin.com/5NGRxntK我在其中引入了一系列附加的clipPath尝试将当前交集与下一个原始交集相交的元素clipPath要添加到交集。这种方法对我来说似乎相当不优雅。此外,该 SVG 似乎不适用于某些版本的 Firefox (ESR 17.x),尽管它可以在 Firefox 5、Chrome 和 IE 上呈现预期结果。 SVG 有问题吗?或者即使它是正确的,是否有更简单/更好的方法来实现交叉点?
你这样做的方式看起来很合理。有一个w3c 示例 http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/masking-path-07-b.html在测试套件中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)