summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pas-cv/latex/macro-centaure.tex
blob: 3dd7b62118353d97cae063a04bda8589dc403caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
\def\modele@centaure{centaure}
\def\cv@h@centaure{4}

% =============== FOND ===============
\newcommand*\fond@centaure{%
	% rayons 
	\begin{scope}[xshift=3cm,yshift=-0.5*\cv@h@centaure cm]
		\foreach \a in {0,5,...,355}
		{
			\pgfmathparse{10*cos(\a)}\let\x\pgfmathresult
			\pgfmathparse{10*sin(\a)}\let\y\pgfmathresult
			\draw[gray!50,opacity=.25] (0,0) -- (\x,\y);
		}
	\end{scope}
	% Photo
	\ifx\cmdPAS@bg@pic\@empty%
	\else
		\ifx\cmdPAS@bg@borderpic\@empty
			\node at (3,-.5*\cv@h@centaure) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\else
			\node[draw=\cmdPAS@bg@borderpic,very thick,inner sep=1pt] at (3,-.5*\cv@h@centaure) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\fi
	\fi
	% Cercles
	\fill[\cmdPAS@bg@bgcolor] (12,-\cv@h@centaure-2) circle (1cm);
	\fill[\cmdPAS@bg@bgcolor!50] (13,-\cv@h@centaure) circle (.75cm);
	\fill[\cmdPAS@bg@bgcolor] (13.75,-\cv@h@centaure) circle (.5cm);
	\fill[\cmdPAS@bg@bordercolor] (10,-\cv@h@centaure) circle (.5cm);
	\fill[\cmdPAS@bg@bgcolor!50] (22,-\cv@h@centaure) circle (1.5cm);
	\fill[\cmdPAS@bg@bordercolor!50] (15,-\cv@h@centaure+.5) circle (.25cm);
	\fill[\cmdPAS@bg@bgcolor] (12.5,-\cv@h@centaure+1.5) circle (.2cm);
	% Rectangle
	\shade[inner color=\cmdPAS@bg@bgcolor!20,outer color=\cmdPAS@bg@bgcolor] (0,-\cv@h@centaure) rectangle+(\paperwidth,-2);
	% Cercles
	\fill[\cmdPAS@bg@bordercolor] (17,-\cv@h@centaure-1.9) circle (.25cm);
	\fill[\cmdPAS@bg@bgcolor!50] (19,-\cv@h@centaure-2.5) circle (.2cm);
	% Figure libre
	\fill[color=black,opacity=.5] (1,-\cv@h@centaure-.3) -- (6.1,-\cv@h@centaure-.3) .. controls (6.1,-\cv@h@centaure-.4) and (5.1,-\cv@h@centaure-1.1) .. (5.1,-\cv@h@centaure-1.7) -- (1,-\cv@h@centaure-1.7) -- cycle;
	\filldraw[draw=white,thick,left color=white,right color=\cmdPAS@bg@bordercolor] (0,-\cv@h@centaure-.2) -- (6,-\cv@h@centaure-.2) .. controls (6,-\cv@h@centaure-.3) and (5,-1-\cv@h@centaure) .. (5,-1.8-\cv@h@centaure) -- (0,-1.8-\cv@h@centaure) -- cycle;
	\fill[white] (3,-\cv@h@centaure-.5) circle (.2cm);
	\fill[white,opacity=.2] (4,-1-\cv@h@centaure) circle (.4cm);
	% Traits horizontaux
	\draw[very thick,white] (0,-.2-\cv@h@centaure) -- (\paperwidth,-.2-\cv@h@centaure);
	\draw[very thick,white] (0,-1.8-\cv@h@centaure) -- (\paperwidth,-1.8-\cv@h@centaure);
	% Poste
	\node[color=black,right,opacity=.5] at (7.05,-1.05-\cv@h@centaure) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
	\node[color=\cmdPAS@bg@postecolor,right] at (7,-1-\cv@h@centaure) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
	% bas
	\fill[\cmdPAS@bg@bgcolor!50] (21,-27.5) circle (1cm);
	\fill[\cmdPAS@bg@bordercolor] (19.5,-27) circle (.35cm);
	\fill[\cmdPAS@bg@bgcolor!75] (20,-26.5) circle (.15cm);
	\fill[\cmdPAS@bg@bgcolor] (0,-26.85) rectangle+(\paperwidth,-.3);
	\shade[right color=\cmdPAS@bg@bgcolor,left color=\cmdPAS@bg@bgcolor!20] (14,-26.85) rectangle+(10,-.3);
	\shade[left color=\cmdPAS@bg@bgcolor,right color=\cmdPAS@bg@bgcolor!20] (0,-26.85) rectangle+(14,-.3);
}

%=============== INFO GAUCHE ===============
\newcommand*\infoLeft@centaure[1]{%
	\AddToShipoutPicture{%
		\put(\LenToUnit{5cm},\LenToUnit{.97\paperheight})
		{%
			\rlap
			{%
				\begin{minipage}[t]{10cm}
					#1
				\end{minipage}
			}
		}
	}
}

%=============== INFO DROITE ===============
\newcommand*\infoRight@centaure[1]{%
	\AddToShipoutPicture
	{%
		\put(\LenToUnit{.95\paperwidth},\LenToUnit{.97\paperheight}){%
			\llap{%
			\begin{minipage}[t]{.45\paperwidth}
				\begin{flushright}#1\end{flushright}
			\end{minipage}
			}
		}
	}
}

%=============== TITRE ===============
\newcommand*\title@centaure[1]{%
	\noindent
	\begin{tikzpicture}
		\foreach \a in {0,10,...,350}
		{
			\draw[\cmdPAS@title@bordercolor] (0,0) -- ({.25*cos(\a)},{.25*sin(\a)});
		}
		\node[text=\cmdPAS@title@color,right] at (.5,0) {#1};
	\end{tikzpicture}
}

%=============== MARGES ===============
\newcommand*\margins@centaure{
\FPeval\result{clip(\cv@h@centaure+3.5)}
\newgeometry{tmargin=\result cm,bmargin=2.5cm,lmargin=1.5cm,rmargin=1.5cm}}

%=============== CLEARPAGE ===============
\newcommand*\clearpage@centaure{%
	\fill[\cmdPAS@bg@bgcolor!50] (21,-27.5) circle (1cm);
	\fill[\cmdPAS@bg@bordercolor] (19.5,-27) circle (.35cm);
	\fill[\cmdPAS@bg@bgcolor!75] (20,-26.5) circle (.15cm);
	\fill[\cmdPAS@bg@bgcolor] (0,-26.85) rectangle+(\paperwidth,-.3);
	\shade[right color=\cmdPAS@bg@bgcolor,left color=\cmdPAS@bg@bgcolor!20] (14,-26.85) rectangle+(10,-.3);
	\shade[left color=\cmdPAS@bg@bgcolor,right color=\cmdPAS@bg@bgcolor!20] (0,-26.85) rectangle+(14,-.3);
}
\newcommand*\clearmargins@centaure{%
	\newgeometry{tmargin=1.5cm,bmargin=2.5cm,lmargin=1.5cm,rmargin=1.5cm}
}