Last active
July 6, 2024 12:46
-
-
Save NIA/99cdca614cb8546d737b to your computer and use it in GitHub Desktop.
A simple class diagram using LaTeX+TikZ+tikz-uml.sty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% tikz-uml.sty is from http://perso.ensta-paristech.fr/~kielbasi/tikzuml | |
\begin{myfigure}{Диаграмма классов основной программы}{fig:main-classes} | |
\begin{tikzpicture}[scale=0.8, transform shape] | |
\begin{umlpackage}[fill=color1bg]{Model} | |
\umlemptyclass[type=interface]{Protocol} | |
\umlemptyclass[left=5mm of Protocol.north west, anchor=north east]{FileWriter} | |
\umlemptyclass[below=1.5cm of FileWriter.south west, anchor=north west]{Settings} | |
\end{umlpackage} | |
\begin{umlpackage}[fill=color3bg]{Controller} | |
\umlemptyclass[right=1cm of Protocol.north east, anchor=north west]{Worker} | |
\end{umlpackage} | |
\begin{umlpackage}[fill=color0bg]{Util} | |
\umlemptyclass[below=1.5cm of Worker]{Logger} | |
\end{umlpackage} | |
\begin{umlpackage}[fill=color2bg]{View} | |
\umlemptyclass[right=1cm of Worker]{MainWindow} | |
\umlemptyclass[below=1.5cm of MainWindow.south west, anchor=north west]{LogWindow} | |
\umlemptyclass[right=5mm of MainWindow]{TimePlot} | |
\umlemptyclass[below=1.5cm of TimePlot.south east, anchor=north east]{StatsBox} | |
\end{umlpackage} | |
% связи: | |
\umldep[geometry=|-]{FileWriter}{Protocol} | |
\umluniassoc[geometry=|-]{Worker}{Protocol} | |
\umluniassoc{MainWindow}{Worker} | |
\umlunicompo{MainWindow}{TimePlot} | |
\umlunicompo[geometry=|-|]{MainWindow}{LogWindow} | |
\umlunicompo[geometry=|-|]{MainWindow}{StatsBox} | |
\umldep{LogWindow}{Logger} | |
\umldep[geometry=-|-, arm1=-7mm, anchor1=200]{Worker}{Settings} | |
\end{tikzpicture} | |
\end{myfigure} |
Nogard-YT
commented
Jul 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment