pattern筆刷填充元素?zé)ofill,有stroke,填充內(nèi)容全被stroke占滿
<g?transform="translate(?100,?500?)"> ??<defs> ????<pattern?height=".5"?id="pattern1" ?????????????patternContentUnits="objectBoundingBox" ?????????????patternUnits="objectBoundingBox"?width=".5"> ??????<circle?cx=".25"?cy=".25"?fill="red"?r=".25"?></circle> ??????<!--如果使用fill為none,stroke會占滿整個填充--> ??????<!--<circle?cx=".25"?cy=".25"?fill="none"?r=".25"?stroke="gray"?></circle>--> ????</pattern> ??</defs> ??<rect?fill="url(#pattern1)"?height="100"?width="100"?stroke="rgba(0,?0,?0,?.4)"></rect> </g>
# 上面的pattern如果使用的circle的fill設(shè)置為none,stroke設(shè)置了之后無論如何,紋理全被stroke顏色填充
填空就不能使用圓形邊框填空嗎?
還請高人解答
2021-12-18
不能用,要用fillstyle
2021-10-14
這個畫得有點大了吧