2

enter image description here

I want to create an arrow that behaves like a solid arrow but is hollow inside.

How can I draw a hollow arrow in Inkscape?

Is there any straightforward way to do this other than using path and union?

1
  • 1
    Another way is to: (1) enable grid, (2) enable snapping, (3) start drawing with the Bezier tool
    – s.ouchene
    Mar 23, 2022 at 9:57

1 Answer 1

2

When you say "behaves like a solid arrow", I assume you mean like a stroke with an arrow head marker, so that it's still fully functional as such.

It's kind of possible if you don't mind using SVG filters. Just a word of warning though, sometimes SVG filters don't work the same in all browsers, so you might want to test them before using them in an SVG. As far as I can tell, this method doesn't render properly in Firefox, and it's a bit off in Chrome. This solution is probably better suited to output as PNG rather than vector. Also if you want to export as PDF, these effects will be rasterized.

Anyway . . .

Draw a line, set the stroke to white, and apply an arrow head. You may want to switch to the chequered background display in Document Properities so you can see it.

Then do Filters > Morphology > Oultine, and adjust the parameters to give you a thin black outline. You can use the settings shown below as a starting point, although it might depend on the size of the stroke. For reference my stroke was set to around 5mm wide here.

Note: You can leave the "Hide image" option unchecked if you want the interior to be white instead of transparent

enter image description here

Once you have done that, you can click and move the arrow around, change its stroke width and so on. Works like a normal arrow in Inkscape

enter image description here

Here's the Inskcape SVG if you want to play with it

<svg
   width="47.391552mm"
   height="64.256264mm"
   viewBox="0 0 47.391552 64.256264"
   version="1.1"
   id="svg9515"
   inkscape:version="1.1 (c68e22c387, 2021-05-23)"
   sodipodi:docname="arrow.svg"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg">
  <sodipodi:namedview
     id="namedview9517"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageshadow="2"
     inkscape:pageopacity="0.0"
     inkscape:pagecheckerboard="0"
     inkscape:document-units="mm"
     showgrid="false"
     inkscape:zoom="2.3375982"
     inkscape:cx="124.70064"
     inkscape:cy="131.97307"
     inkscape:window-width="1920"
     inkscape:window-height="1017"
     inkscape:window-x="-8"
     inkscape:window-y="-8"
     inkscape:window-maximized="1"
     inkscape:current-layer="layer1" />
  <defs
     id="defs9512">
    <marker
       style="overflow:visible"
       id="TriangleInS-9"
       refX="0"
       refY="0"
       orient="auto"
       inkscape:stockid="TriangleInS"
       inkscape:isstock="true">
      <path
         transform="scale(-0.2)"
         style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
         d="M 5.77,0 -2.88,5 V -5 Z"
         id="path1177-0" />
    </marker>
    <filter
       style="color-interpolation-filters:sRGB"
       height="1.3719046"
       width="128.67406"
       y="-0.25909955"
       x="-63.44999"
       inkscape:label="Outline"
       id="filter9204">
      <feGaussianBlur
         in="SourceAlpha"
         stdDeviation="0.309251"
         result="blur1"
         id="feGaussianBlur9180" />
      <feComposite
         in="SourceGraphic"
         in2="blur1"
         operator="out"
         result="composite1"
         id="feComposite9182" />
      <feColorMatrix
         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 -0 "
         result="colormatrix1"
         id="feColorMatrix9184" />
      <feGaussianBlur
         stdDeviation="0.01"
         result="blur2"
         id="feGaussianBlur9186" />
      <feComposite
         in="blur2"
         in2="blur2"
         operator="over"
         result="composite2"
         id="feComposite9188" />
      <feColorMatrix
         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 3.39275 -0 "
         result="colormatrix2"
         id="feColorMatrix9190" />
      <feGaussianBlur
         stdDeviation="0.116707"
         result="blur3"
         id="feGaussianBlur9192" />
      <feColorMatrix
         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 "
         result="colormatrix3"
         id="feColorMatrix9194" />
      <feFlood
         flood-opacity="1"
         flood-color="rgb(0,0,0)"
         result="flood"
         id="feFlood9196" />
      <feComposite
         in="flood"
         in2="colormatrix3"
         operator="in"
         result="composite3"
         id="feComposite9198" />
      <feComposite
         in="composite3"
         in2="colormatrix3"
         operator="out"
         result="composite4"
         id="feComposite9200" />
      <feComposite
         in="composite4"
         in2="composite3"
         k2="1"
         k3="1"
         operator="arithmetic"
         result="composite5"
         id="feComposite9202"
         k1="0"
         k4="0" />
    </filter>
  </defs>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(-88.245154,-111.56146)">
    <path
       style="fill:none;stroke:#ffffff;stroke-width:5.065;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;marker-start:url(#TriangleInS-9);paint-order:fill markers stroke;filter:url(#filter9204);stop-color:#000000"
       d="m 111.84053,130.50958 -0.11318,31.80527"
       id="path901"
       sodipodi:nodetypes="cc" />
  </g>
</svg>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.