\newcommand*{\name}[1]{%
  \small
  \begin{tabular}{@{}c@{}}
    #1
  \end{tabular}
}
\newcommand*{\interfaceS}[3]{%
  \draw[line width=2pt,color=red] #1 -- ++(-0.4,0) ++(0,-0.4) -- node[left,black] (#2) {\name{#3}} ++(0,0.8);
  \draw #1 ++(-0.4,0) node (#2) {};
}
\newcommand*{\interfaceC}[3]{%
  \draw[line width=2pt,color=green] #1 -- ++(0.4,0) ++(0,-0.4) -- node[right,black] {\name{#3}} ++(0,0.8);
  \draw #1 ++(0.4,0) node (#2) {};
}
\newcommand*{\controller}[3]{%
  \draw[line width=2pt,color=blue!70!black] (#1,#2) -- ++(0,0.4) ++(-0.4,0) -- node[above,black] {\name{#3}} ++(0.8,0);
}
\newcommand*{\interceptor}[3]{%
  \draw (#1,#2) node[dashed,draw=black,text height=1.6cm] (txt) {\name{#3}};
  % REMETTRE      \draw[fill=pink,rounded corners] (txt) ++(-0.4,0.2) rectangle ++(0.8,0.8);
  \draw[fill=magenta,rounded corners] (txt) ++(-0.4,0.2) rectangle ++(0.8,0.8);
}
\newcommand*{\attribute}[3]{%
  \draw (#1,#2) node (txt) {\name{#3}};
  \draw[fill=violet!40] (txt) ++(-0.4,0.5) -- ++(0.8,0) -- ++(-0.4,1) -- cycle;
}
\newcommand*{\componentF}[4]{
  \draw[line width=1.5mm,color=blue!30,fill=blue!10] (0,0) rectangle +(#1,#2) +(1,#2) node[above,black] {\name{#3}};
  \draw (#1,0) ++(-2,1) node[black,fill=blue!30,ellipse,minimum height=1cm] {#4};
}
\newcommand*{\composite}[5]{
  \draw[line width=1.5mm,color=blue!30,fill=blue!10] #1 rectangle +(#2,#3);
  \draw #1 ++(#2/2,#3/2) node (#4) {};
%  \draw #1+(1,#2) node[above,black] {\name{#3}};
  % \draw (#1,0) ++(-2,1) node[black,fill=blue!30,ellipse,minimum height=1cm] {#4};
}
