[pstricks] Bluring self-created High Level Object

Herbert Voss LaTeX at zedat.fu-berlin.de
Sat Jun 23 16:52:56 CEST 2007


Martin Röhricht wrote:
>
> This is already a wonderful improvement. Thank you very much for all 
> your help and the time that you invest on other person's problems.
> I was curious if it is possible to make the object look a bit more 
> 3-dimensional, e.g. by adding a shadowing (blur) effect to it, such that 
> all edges are handled as if the object wasn't composed of different 
> smaller elements rather as if the object was coherent.
>   
then you should draw the frame twice ...

\documentclass{scrartcl}

\usepackage{pstricks}
\usepackage{pst-blur}
\usepackage{multido}

\pagestyle{empty}
\makeatletter
\def\pstCPU{\pst at object{pstCPU}}
\def\pstCPU at i(#1)#2{{%   #1: lower left #2: text
  
\psset{framearc=0.2,linecolor=gray,fillcolor=gray,fillstyle=solid}%default
   \begin at ClosedObj
   \rput[lb](#1){%
   \psframe(1.4,1.6)
   { \psset{shadow=false}
   \multirput[lb](0,0)(0,0.3){5}{\psline[linewidth=4pt](-0.2,0.2)(1.6,0.2)}}
   \psframe[shadow=false](1.4,1.6)
   \rput(0.7,1.4){\footnotesize\bfseries\textsf{CPU#2}}}
   \end at ClosedObj}%
   \ignorespaces%
}
\makeatother

\begin{document}

\begin{pspicture}(0,0)(4,5)
\multido{\rA=0+2,\iB=0+1}{2}{\pstCPU[fillcolor=red!50](\rA,3.4){-\iB}}
\psset{shadow=true,blur=true,shadowsize=10pt}
\pstCPU[fillcolor=blue!20,blurradius=5pt,linecolor=black](0,0){-X}
\pstCPU[linecolor=black](3,0){-XX}
\end{pspicture}

\end{document}

Herbert



More information about the PSTricks mailing list