Inkscape.org
Beginners' Questions Fill whitespace
  1. #1
    sugarmoose sugarmoose @sugarmoose

    I have a simple svg icon which has a white 'A'. I want to put this icon on top of a png. Now the white letter 'A' is transparent. So it shows the png on the background which I don't want. I tried to fill the A with white and other colors but found that this does not work. For some reason it is not possible to fill a svg object in this way.

    I noticed that it it possible to use the fill tool on the png.

    Why is not possible to use fill on svg objects? InkScape is primarily a svg tool but the fill tool does not work on svg images.

    How I can create a icon similar to below but than with a white letter 'A' rather than a empty space?

     

     

     

     

    <?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
       xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
       width="150mm"
       height="150mm"
       viewBox="0 0 150.00001 149.99999"
       version="1.1"
       id="svg27551"
       sodipodi:docname="ansible.svg"
       inkscape:export-filename="/home/ostraaten/svn/doc/dxc-uwv/cd-platform/png/ansible.png"
       inkscape:export-xdpi="25.400003"
       inkscape:export-ydpi="25.400003"
       inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
      <defs
         id="defs27545" />
      <sodipodi:namedview
         id="base"
         pagecolor="#ffffff"
         bordercolor="#666666"
         borderopacity="1.0"
         inkscape:pageopacity="0.0"
         inkscape:pageshadow="2"
         inkscape:zoom="0.49497475"
         inkscape:cx="-857.73844"
         inkscape:cy="659.91311"
         inkscape:document-units="mm"
         inkscape:current-layer="layer1"
         inkscape:document-rotation="0"
         showgrid="false"
         fit-margin-top="0"
         fit-margin-left="0"
         fit-margin-right="0"
         fit-margin-bottom="0"
         inkscape:window-width="2493"
         inkscape:window-height="1389"
         inkscape:window-x="1987"
         inkscape:window-y="27"
         inkscape:window-maximized="1" />
      <metadata
         id="metadata27548">
        <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></dc:title>
          </cc:Work>
        </rdf:RDF>
      </metadata>
      <g
         inkscape:label="Layer 1"
         inkscape:groupmode="layer"
         id="layer1"
         transform="translate(-131.93441,-253.72197)">
        <g
           inkscape:export-ydpi="1147.42"
           inkscape:export-xdpi="1147.42"
           inkscape:export-filename="/home/ostraaten/svn/doc/dxc-uwv/cd-platform/export/cd-platform-overview.png"
           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0111712"
           transform="matrix(0.58777429,0,0,0.58777429,131.52297,253.54564)"
           id="Page-1-3-9-8-9-2">
          <g
             style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke-width:0.0111712"
             id="ansible-icon-1-1-9-1-8">
            <polygon
               style="fill:#000000;fill-opacity:1;stroke-width:0.0111712"
               id="Shape-7-9-1-2-7"
               points="113.6,120.4 163.5,159.7 130.5,78.2 " />
            <path
               style="fill:#000000;fill-opacity:1;stroke-width:0.0111712"
               inkscape:connector-curvature="0"
               d="M 128.3,0.3 C 57.9,0.3 0.7,57.4 0.7,127.9 c 0,70.5 57.1,127.6 127.6,127.6 70.5,0 127.6,-57.1 127.6,-127.6 C 255.9,57.4 198.8,0.3 128.3,0.3 Z m 52.4,191 c -2.5,0 -4.4,-1 -7,-3.1 L 107.8,135 85.7,190.3 H 66.6 l 55.7,-134 c 1.4,-3.5 4.6,-5.4 8.1,-5.4 3.5,0 6.4,1.9 7.9,5.4 l 50.8,122.2 c 0.6,1.5 0.9,2.9 0.9,3.8 0,5.3 -4.4,9 -9.3,9 z"
               id="path15711-5-6-5-6-6" />
          </g>
        </g>
      </g>
    </svg>

  2. #2
    Tyler Durden Tyler Durden @TylerDurden
    *

    There are a number of issues to address before placing a white filled "A" in front of an image.

    • There are a number of groups to be ungrouped.
    • The center of the "A" must be converted to a path.
    • The center of the "A" and its surrounding shape must be combined.
    • The circle surrounding the "A" must be removed.
    • Then the A can have a fill assigned.