我有一个简单的孵化模式:
<defs>
<pattern id="pattern1" patternUnits="userSpaceOnUse"
x="0" y="0" width="10" height="10"
>
<line x1="0" y1="0" x2="10" y2="10" stroke="black" />
<line x1="0" y1="-10" x2="20" y2="10" stroke="black" />
<line x1="-10" y1="0" x2="10" y2="20" stroke="black" />
</pattern>
</defs>
<rect fill="url(#pattern1)" stroke="black"
x="100" y="100" width="200" height="100"/>
<rect fill="url(#pattern1)" stroke="red"
x="100" y="300" width="200" height="100"/>在使用时,是否有方法来设置图案中线条的颜色?例如,我想在第二个rect中将颜色设置为红色。
发布于 2014-01-29 09:47:57
如果你更新了图案中的颜色,它会影响到两个区域。如果你想要不同的颜色在不同的区域,你将不得不使用不同的模式。
https://stackoverflow.com/questions/21427131
复制相似问题