Inkscape.org
Beginners' Questions Clipping image with path only results in some parts of path being cut out
  1. #1
    A7XfanBen A7XfanBen @A7XfanBen

    I'm trying to cut a path out of an image, and the path has multiple sections where there are essentially holes on the inside that I need cut out of the image.  However, when I go to Object>Clip>Set Clip, it only cuts out some of the holes and not all of them.  I've tried putting the path and image on the same layer and other slight variations but nothing has been working. When I clip the image, it doesn't clip the holes on the left, only the ones on the right.  The path is one combined path, not split into subpaths or groups of paths.  I have done this operation successfully with other very similar paths, so I'm not sure why it's working for some and not others.

    The "before" screenshot with the green outline shows the path to be clipped in black over the image. The after shows the result of a clip, with the left (horizontal holes) parts not clipped while the right ones are clipped. For some reason the clipping ignores certain chunks of the path and not others. I checked the path and those hole sections are continuous without any breaks or anything.

    3. File was created in Inkscape from an SVG and PNG downloaded from the internet.

    5. Windows 11

    6. Recently upgraded Inkscape from 1.2 to 1.3.2

    7. Used .msi installer

    8. None

    9. None

    Inkscape Clip Issue After
    Inkscape Clip Issue Before
  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Please share the Inkscape svg file that has the issue.

  3. #3
    A7XfanBen A7XfanBen @A7XfanBen
    TylerDurden

    Please share the Inkscape svg file that has the issue.

    Attached, thanks!

    Card 1
  4. #4
    Paddy_CAD Paddy_CAD @Paddy_CAD
    🙏

    I filled your clipping path and saw that it doesn't have horizontal holes. Use the node tool to select the horizontal subpaths then [Path > Reverse] to make holes.

    I tried and failed to explain what's going on here. It's complicated and too long for a forum paragraph. Instead I'll set you some homework. Search the web for "svg fill-rule" or follow this link to the online manual.
    http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html#Attributes-Fill-Rule

  5. #5
    A7XfanBen A7XfanBen @A7XfanBen
    Paddy_CAD

    I filled your clipping path and saw that it doesn't have horizontal holes. Use the node tool to select the horizontal subpaths then [Path > Reverse] to make holes.

    Amazing!  I just executed on that and it worked great!  Thanks a ton!

    Paddy_CAD

    I tried and failed to explain what's going on here. It's complicated and too long for a forum paragraph. Instead I'll set you some homework. Search the web for "svg fill-rule" or follow this link to the online manual.
    http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html#Attributes-Fill-Rule

    Will educate myself more today, thanks!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Clipping image with path only results in some parts of path being cut out