summaryrefslogtreecommitdiffstats
path: root/yaac-another-awesome-cv.cls
diff options
context:
space:
mode:
authorEduard Itrich <eduard@itrich.net>2019-05-20 12:33:10 +0200
committerEduard Itrich <eduard@itrich.net>2019-05-20 12:33:10 +0200
commit80da6bc4b66275933d7e85d55ecd0d75455adb54 (patch)
treeaf0d52bf5e37dbb507db96593c3fbe072cf6e3ff /yaac-another-awesome-cv.cls
parentf182ddaf15981b4de305bfdeb51f31fea5a0b4e2 (diff)
downloadcv-80da6bc4b66275933d7e85d55ecd0d75455adb54.tar.gz
cv-80da6bc4b66275933d7e85d55ecd0d75455adb54.tar.bz2
cv-80da6bc4b66275933d7e85d55ecd0d75455adb54.tar.xz
cv-80da6bc4b66275933d7e85d55ecd0d75455adb54.zip
Added 'roundedsquare' and 'squircle' to the list of photo shapes.
Diffstat (limited to 'yaac-another-awesome-cv.cls')
-rwxr-xr-xyaac-another-awesome-cv.cls17
1 files changed, 14 insertions, 3 deletions
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];
+ }
+ }
+
}
}