有没有办法获取预定义虚线图案的值,例如dotted
?我想在另一个程序中使用这些图案来创建相同的视觉体验。还是我必须定义自己的图案才能获得相同的值?
答案1
tikz.code.tex
您可以在发行版的文件中找到这些定义和许多其他定义(例如,MikTeX 在 下有它C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pgf\frontendlayer\tikz\
)
\tikzstyle{solid}= [dash pattern=]
\tikzstyle{dotted}= [dash pattern=on \pgflinewidth off 2pt]
\tikzstyle{densely dotted}= [dash pattern=on \pgflinewidth off 1pt]
\tikzstyle{loosely dotted}= [dash pattern=on \pgflinewidth off 4pt]
\tikzstyle{dashed}= [dash pattern=on 3pt off 3pt]
\tikzstyle{densely dashed}= [dash pattern=on 3pt off 2pt]
\tikzstyle{loosely dashed}= [dash pattern=on 3pt off 6pt]
\tikzstyle{dashdotted}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt]
\tikzstyle{densely dashdotted}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt]
\tikzstyle{loosely dashdotted}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt]
为了快速比较,请参见以下输出: