Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions pgf-umlcd.sty
Original file line number Diff line number Diff line change
Expand Up @@ -265,32 +265,30 @@ minimum height=1cm, node distance=2cm]

\newcommand{\instanceOf}[1]{\def\@instanceOf{#1}}

\newcommand{\association}[6]{
\draw [umlcd style] (#1) -- (#4)
node[near start, above]{#2}
node[near start, below]{#3}
node[near end, above]{#5}
node[near end, below]{#6};
\newcommand{\association}[7][]{
\draw [umlcd style,#1] (#2) -- (#5)
node[near start, auto]{#3}
node[near start, auto, swap]{#4}
node[near end, auto]{#6}
node[near end, auto, swap]{#7};
}

\newcommand{\unidirectionalAssociation}[4]{
\draw [umlcd style, ->] (#1) -- (#4)
node[near end, above]{#2}
node[near end, below]{#3};
\newcommand{\unidirectionalAssociation}[5][]{
\draw [umlcd style, ->, #1] (#2) -- (#5)
node[near end, auto]{#3}
node[near end, auto, swap]{#4};
}

\newcommand{\aggregation}[4]
{
\draw[umlcd style, open diamond->] (#1) -- (#4)
node[near end, above]{#2}
node[near end, below]{#3};
\newcommand{\aggregation}[5][]{
\draw[umlcd style, open diamond->, #1] (#2) -- (#5)
node[near end, auto]{#3}
node[near end, auto, swap]{#4};
}

\newcommand{\composition}[4]
{
\draw[umlcd style, fill=\umldrawcolor, diamond->] (#1) -- (#4)
node[near end, above]{#2}
node[near end, below]{#3};
\newcommand{\composition}[5][]{
\draw[umlcd style, fill=\umldrawcolor, diamond->, #1] (#2) -- (#5)
node[near end, auto]{#3}
node[near end, auto, swap]{#4};
}

\newenvironment{package}[1]{
Expand Down