标签:image vpd strong 文件头 com fill 没有 end cto
代码的文件头与备忘一中的一样,这里不再列出。% 51CTO陆巍的博客
\begin{center}
\begin{tikzpicture}
\begin{umlpackage}[x = 0, y = 0, draw = purple, fill = umlyellow]{Policy}
\umlsimpleclass[draw = purple]{Policy Layer}
\umlinterface[right = 1cm of Policy Layer, draw = purple]{Policy Service Interface}{}{}
\umluniassoc[draw = purple]{Policy Layer}{Policy Service Interface}
\end{umlpackage}
\begin{umlpackage}[x = 0, y = -4, draw = purple, fill = umlyellow]{Mechanism}
\umlsimpleclass[below = 2cm of Policy Service Interface, draw = purple]{Mechanism Layer}
\umlinterface[right = 1cm of Mechanism Layer, draw = purple]{Mechanism Service Interface}{}{}
\umluniassoc[draw = purple]{Mechanism Layer}{Mechanism Service Interface}
\end{umlpackage}
\begin{umlpackage}[x = 0, y = -8, draw = purple, fill = umlyellow]{Utility}
\umlsimpleclass[below = 2cm of Mechanism Service Interface, draw = purple]{Utility Layer}
\end{umlpackage}
\umlimpl[draw = purple]{Mechanism Layer}{Policy Service Interface}
\umlimpl[draw = purple]{Utility Layer}{Mechanism Service Interface}
\end{tikzpicture}
\\[0.4cm]\heiti 图11.2 倒置的层次\song
\end{center}
效果如下:
说明:
1) 注意控制位置的方式有两种,一种是设置坐标,一种是使用相对位置,代码中都有演示。
2) 这里没有过多修饰图形,所以看上去并不美观,请大家自行调整。
标签:image vpd strong 文件头 com fill 没有 end cto
原文地址:http://blog.51cto.com/14013986/2331006