我需要在其他图形对象顶部添加透明网格。我知道该选项strokeopacity
可用于更改路径的描边不透明度。我进行了如下尝试,但它不适用于网格。
你能告诉我如何实现我的目标吗?
\documentclass{article}
\usepackage{pstricks}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}
\PreviewBorder=12pt
\newpsstyle{mygridstyle}{
strokeopacity=0.5,
subgriddiv=4,
gridlabels=5pt,
gridlabelcolor=red,
gridfont=Verdana,
gridcolor=magenta!50,
subgridcolor=gray!50,
gridwidth=2pt,
subgridwidth=1pt,
}
\begin{document}
\begin{pspicture}(3,3)
\psset{linewidth=10pt,strokeopacity=0.5}
\psline[linecolor=blue](3,3)
\psline[linecolor=red](3,0)(0,3)
\psgrid[style=mygridstyle]
\end{pspicture}
\end{document}
答案1
pstricks.tex
使用来自的版本http://texnik.dante.de/tex/generic/pstricks/的值strokeopacity
被考虑在内。顺便说一句:您可以使用showgrid=top
:
\documentclass{article}
\usepackage{pstricks}
\newpsstyle{gridstyle}{
strokeopacity=0.5,
subgriddiv=4,
gridlabels=5pt,
gridlabelcolor=red,
gridfont=Verdana,
gridcolor=magenta!50,
subgridcolor=gray!50,
gridwidth=2pt,
subgridwidth=1pt,
}
\begin{document}
\begin{pspicture}[showgrid=top](3,3)
\psset{linewidth=10pt}%,strokeopacity=0.5}
\psline[linecolor=blue](3,3)
\psline[linecolor=red](3,0)(0,3)
\end{pspicture}
\end{document}
我pstricks.tex
今天也会将其上传到 CTAN。