Inkscape.org
Beginners' Questions How to fill an area with lines?
  1. #1
    lczhang lczhang @lczhang
    *

     

    I noticed that in Inkscape, we can fill areas with solid colors, gradients, or various patterns, but I haven't seen an option specifically for filling areas with lines, such as north east lines.

     

    In LaTeX, we can achieve this using the \filldraw command. I'm not sure if I missed any feature in Inkscape that allows for line filling.

    \documentclass{article}
    \usepackage{tikz}
    \usetikzlibrary{patterns}
    \begin{document}
    
    \begin{tikzpicture}
    \filldraw[pattern=north east lines, pattern color=blue] (0,0) .. controls 
    (0.5,0.2) and (0.8,1) .. (1.5,1.2)
                                    .. controls (2,1.4) and (2,0.5) .. (2.5,0.8)
                                    .. controls (2.7,1) and (2.6,1.5) .. (3,1.8)
                                    .. controls (3.2,2) and (2.9,1.8) .. (3,1.5)
                                    .. controls (3.1,1.3) and (2.7,1.2) .. (2.5,1)
                                    .. controls (2.2,0.8) and (2.1,0.4) .. (1.7,0.2)
                                    .. controls (1.2,0) and (0.8,0.3) .. (0.5,0)
                                    .. controls (0.3,-0.2) and (0.2,0.2) .. (0,0);
    \end{tikzpicture}
    
    \end{document}

     

     

    B
  2. #2
    Polygon Polygon @Polygon🌶
    👍

    You can make a line a pattern and from there a Pattern Fill.

  3. #3
    lczhang lczhang @lczhang
    *

    Thank you for your response. I found what I wanted in the link below.

    However, can these custom patterns be saved even after restarting the software? (And if I no longer like it, can I delete it as well?) For example, the blue line. I noticed that when I restart the Inkscape, the previous custom patterns disappear.

  4. #4
    David248 David248 @David248
    *

    Hello,

    Save the svg with your custom patterns in the patterns directory, wich location varies among os and versions but can be found and opened  using edit>préférences and browse to "system".

    After restarting inkscape, they can be used with new documents.

    You can also take a look there

    https://inkscape.org/forums/tutorials/custom-patterns-work-in-progress/

    https://inkscape.org/~henkjan_nl/%E2%98%85classical-hatch-patterns-for-mechanical-drawings#c1205 

     

     

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions How to fill an area with lines?