diff options
| -rwxr-xr-x | README.md | 2 | ||||
| -rwxr-xr-x | yaac-another-awesome-cv.cls | 17 | 
2 files changed, 15 insertions, 4 deletions
@@ -65,7 +65,7 @@ Outside of the `\socialinfo` wrapper you have to define the mandatory parameters  \name{Christophe}{ROGER}  % Define author's photo (optional) -% Usage: \photo[<shape: circular, square>]{<diameter>}{<photo>} +% Usage: \photo[<shape: circular, square, roundedsquare, squircle>]{<diameter>}{<photo>}  % The shape of the author's photo is circular by default.  \photo{2.5cm}{darwiin} diff --git a/yaac-another-awesome-cv.cls b/yaac-another-awesome-cv.cls index f369a43..dbbcfcb 100755 --- a/yaac-another-awesome-cv.cls +++ b/yaac-another-awesome-cv.cls @@ -216,7 +216,7 @@  \newcommand*{\tagline}[1]{\def\@tagline{#1}}  % Define author's photo -% Usage: \photo[<shape: circular, square>]{<diameter>}{<photo>} +% Usage: \photo[<shape: circular, square, roundedsquare, squircle>]{<diameter>}{<photo>}  % The shape of the author's photo is circular by default.  \newcommand{\photo}[3][circular]{\def\@photo{#3}\def\@photodiameter{#2}\def\@photoshape{#1}} @@ -277,8 +277,19 @@  		% Draw square photo  		\tikz\path[fill overzoom image={\@photo}]rectangle(\linewidth,\linewidth);  	}{ -		% Draw circular photp -		\tikz\path[fill overzoom image={\@photo}]circle[radius=0.5\linewidth]; +		\ifthenelse{\equal{\@photoshape}{roundedsquare}}{ +			% Draw square photo with rounded corners +			\tikz\path[fill overzoom image={\@photo}][rounded corners=2mm]rectangle(\linewidth,\linewidth); +		}{ +			\ifthenelse{\equal{\@photoshape}{squircle}}{ +				% Draw squircle photo +				\tikz\path[fill overzoom image={\@photo}][rounded corners=8mm]rectangle(\linewidth,\linewidth); +				}{ +					% Draw circular photo +					\tikz\path[fill overzoom image={\@photo}]circle[radius=0.5\linewidth]; +				} +		} +  	}  }  | 
