如何消除SVG feMorphology/feColorMatrix效应的薄边界

如何消除SVG feMorphology/feColorMatrix效应的薄边界,svg,inkscape,svg-filters,Svg,Inkscape,Svg Filters,我想在我的画周围创建白色轮廓,但在Firefox或Chrome中查看结果时,我看到轮廓周围有一个非常薄的边框 同样在Inkscape中,我看到的轮廓是黑色的 image/svg+xml 我已经重写了你的过滤器。对于feFlood我使用flood color=“gold”让您看到“边框”。您可以将其替换为白色或任何其他颜色。我唯一关心的是,我不知道它在inkscape中会有什么反应。我希望有帮助 image/svg+xml 我已经重写了你的过滤器。对于feFlood我使用flood co

我想在我的画周围创建白色轮廓,但在Firefox或Chrome中查看结果时,我看到轮廓周围有一个非常薄的边框

同样在Inkscape中,我看到的轮廓是黑色的


image/svg+xml

我已经重写了你的过滤器。对于
feFlood
我使用
flood color=“gold”
让您看到“边框”。您可以将其替换为
白色
或任何其他颜色。我唯一关心的是,我不知道它在inkscape中会有什么反应。我希望有帮助


image/svg+xml

我已经重写了你的过滤器。对于
feFlood
我使用
flood color=“gold”
让您看到“边框”。您可以将其替换为
白色
或任何其他颜色。我唯一关心的是,我不知道它在inkscape中会有什么反应。我希望有帮助


image/svg+xml

谢谢,它甚至在Inkscape中看起来都一样。出于好奇,您知道在我的示例中是什么导致了薄边框吗?显然,有一个bug与feColorMatrix的alpha通道有关。此外,使用
feFlood
设置颜色更容易。你可以得到我在《谢谢》中使用的过滤器的解释,它甚至在Inkscape中看起来都一样。出于好奇,您知道在我的示例中是什么导致了薄边框吗?显然,有一个bug与feColorMatrix的alpha通道有关。此外,使用
feFlood
设置颜色更容易。您可以对我在中使用的过滤器进行解释
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:cc="http://creativecommons.org/ns#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  width="210mm"
  height="297mm"
  viewBox="0 0 210 297"
  version="1.1"
  id="svg8">
  <defs
    id="defs2">
    <filter
      style="color-interpolation-filters:sRGB"
      id="filter42"
      inkscape:label="filter0">
      <feMorphology
        id="feMorphology44"
        operator="dilate"
        radius="2"
        in="SourceAlpha" />
      <feColorMatrix
        id="feColorMatrix46"
        values="1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 "
        result="result1" />
      <feMerge
        id="feMerge48">
        <feMergeNode
          inkscape:collect="always"
          id="feMergeNode52"
          in="result1" />
        <feMergeNode
          inkscape:collect="always"
          id="feMergeNode4537"
          in="SourceGraphic" />
      </feMerge>
    </filter>
  </defs>
  <metadata
    id="metadata5">
    <rdf:RDF>
      <cc:Work
        rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
          rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
    inkscape:label="Layer 1"
    inkscape:groupmode="layer"
    id="layer1">
    <g
      id="g4541"
      transform="translate(20.312484,-40.090429)"
      style="filter:url(#filter42)">
      <ellipse
        ry="46.113098"
        rx="48.85342"
        cy="177.74852"
        cx="72.854912"
        id="path26"
        style="fill:#ff0000;stroke:none;stroke-width:0.26458332" />
      <rect
        transform="rotate(49.327242)"
        ry="0"
        y="37.731022"
        x="203.59937"
        height="40.205711"
        width="62.978706"
        id="rect28"
        style="fill:#ff0000;stroke:none;stroke-width:0.26458332" />
    </g>
  </g>
</svg>