\documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{patterns}\pgfdeclarepatternformonly{mydots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1pt}{1pt}}{\pgfqpoint{2pt}{2pt}}% original definition: \pgfqpoint{3pt}{3pt}{% \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}% \pgfusepath{fill}%}%\pgfdeclarepatternformonly{mynewdots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1pt}{1pt}}{\pgfqpoint{1pt}{1pt}}% original definition: \pgfqpoint{3pt}{3pt}{% \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}% \pgfusepath{fill}%}%\begin{document}\begin{tikzpicture}\draw[pattern=dots] (0,0) rectangle ++(3,3);\draw[pattern=mydots] (4,0) rectangle ++(3,3);\draw[pattern=mynewdots] (8,0) rectangle ++(3,3);\end{tikzpicture}\end{document}
↧
Answer by Ignasi for Tikz custom dotted pattern
↧