为什么comp-op属性在SVG中无法应用复合操作?

时间:2018-12-22 10:48:53

标签: java svg composite

我想在SVG的图形渲染项目中应用复合操作。 我的项目使用src-Over,dst-out,dst-in,dst-over等...复合操作。 我不想使用fecomposite,我在Internet上搜索时找到了一些帮助,但是即使我在codepen.io中运行此代码也无法使用。

这是我的代码。

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.2" baseProfile="full" xmlns="http://www.w3.org/2000/svg" id="simplecompop"
     width="100%" height="100%" viewBox="0 0 480 360">
     <title>Simple Compositing</title>
     <g id="content">
        <circle cx="200" cy="160" r="50" fill="blue" opacity="0.7"/>
        <rect x="180" y="150" width="160" height="100" fill="red" opacity="0.8" comp-op="src-atop"/>
     </g>
</svg>

我的Desire输出如下。

enter image description here

执行此代码时得到的输出如下。

enter image description here

我的问题是为什么我没有获得带有“ comp-op”属性的复合操作。同样,我也不想应用fecomposite,如果有的话,请通过其他简单方法提出建议。

下面是我在Internet上找到的所有复合操作输出。

enter image description here

0 个答案:

没有答案