Example: Envelope

Published 2018-03-20 | Author: Émeric Tourniaire

A drawing of an envelope done in TikZ.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Envelope

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Envelope
% Author: Émeric Tourniaire
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{calc,decorations.pathmorphing,decorations.text}
\begin{document}
\begin{tikzpicture}
  % Contour
  \draw[fill=black!10] (2,-1.7) coordinate (a)
             rectangle (7,1.7)  coordinate (b) ;

  % Upper pane
  \draw [fill=black!10,rounded corners] (b) -- ++(120:1)
    -- ($(a|-b)+(60:1)$) -- (a|-b) ;

  % Orange decoration
  \coordinate (c) at (3,0.5) ;
  \coordinate (d) at (6,0.5) ;
  \draw [orange] ($(c)+(0,-.2)$) -- (c) -- ++(0.2,0)
                 ($(d)+(0,-.2)$) -- (d) -- ++(-0.2,0);
  \foreach \i in {0,...,4}
    \draw[orange] ({3+\i*0.25},-1) rectangle ++(0.2,0.3);
  \draw[orange] (4.4,-1) -- (6,-1);

  % White lines
  \draw [white] (3,-0.5) -- (6,-0.5)
                (3,0)    --    (6,0);

  % Writing
  \draw (3,0)    node [anchor=base west] {\textsc{Name} Firstname};
  \draw (3,-0.5) node [anchor=base west] {Adress};
  \draw (4.4,-1) node [anchor=base west] {City};
  \foreach[count=\i] \zip in {1,2,3,4,5}
    \draw ({3-0.125+\i*0.25},-0.85) node {\zip};

  % Stamp
  \begin{scope}
    \clip (5,1.7) -- (7,1.7) -- (6.9,1) arc (0:360:4mm)
                  -- (7,0.5) -- (5,0.5) -- cycle ;
    \foreach \i in {-3,...,3}
      \draw[decorate,decoration={snake,amplitude=0.6mm,segment length=5mm}] 
         (5.2,1+\i/10) -- (6.5,1+\i/10);
  \end{scope}
  \draw (6.5,1) circle (4mm);
        (6.5,1) circle (2.2mm);
  \draw[decorate,decoration={text along path,
    text={|\fontsize{3pt}{3pt}\selectfont| Postal stamp}}]
    (6.25,1) arc  (180:-180:2.5mm) ;
\end{tikzpicture}
\end{document}

Comments

Adding comments is currently not enabled.