Posts

Showing posts with the label Diagrams

Chalkboard Texture For Tikz Lines

Image
Answer : It takes ages . \documentclass[tikz,border=5]{standalone} \usetikzlibrary{decorations,backgrounds} \pgfkeys{decoration/.cd, iterations/.store in=\pgfdecorationiterations, iterations=75, radius/.store in=\pgfdecorationradius, radius=0.25pt, } \pgfdeclaredecoration{chalk}{draw}{ \state{draw}[width=\pgfdecorationsegmentlength]{ \pgftransformxshift{0.5\pgfdecorationsegmentlength/2} \pgfmathloop \ifnum\pgfmathcounter>\pgfdecorationiterations \else \pgfpathcircle{\pgfpointpolar{rnd*360}{rnd*\pgfdecorationsegmentamplitude}}% {\pgfdecorationradius}% \repeatpgfmathloop }} \begin{document} \begin{tikzpicture}[background rectangle/.style={fill=black}, show background rectangle, chalk/.style={fill=white, decorate, decoration={chalk, segment length=1.5pt, amplitude=3pt} },looseness=0.25] \path [chalk] (1/8,2) -- (0,1/2) arc (180:315:1/2) (-1/2,3/2) to [bend right] (5/8,3/2); \path [chalk, shift=(0:1)] (1/8,1) to [bend left] (0,0); \path [chalk, shift=(0:3/2)] (1/8,2) t...