Debian Codegraph @

texmf-dist/tex/latex/worldflags/worldflag_GY.tex

raw
1 % --------------------------------------------------------------------------
2 % Guyana:
3 % --------------------------------------------------------------------------
4 \begin{flagdescription}{3/5}
5 \definecolor{red}{RGB}{200,16,46}
6 \definecolor{green}{RGB}{0,177,64}
7 \definecolor{gold}{RGB}{254,219,0}
8 \fill [green] (0,0) rectangle (\flaglength,1);
9 \newdimen\d\d=0.05\flagwidth
10 \fill [white] (0,0)--(\flaglength,0.5)--(0,1)--cycle;
11 \pgfmathparse{\d/cos(atan2(\flagwidth,2*\flaglength))}
12 \edef\y{\pgfmathresult}
13 \pgfmathparse{\d/sin(atan2(0.5\flagwidth,\flaglength))}
14 \edef\x{\pgfmathresult}
15 \fill [gold] (0,\y*1pt)--(\flaglength-\x*1pt,0.5)--(0,\flagwidth-\y*1pt)--cycle;
16 \fill [black] (0,0)--(0.5\flaglength,0.5)--(0,1)--cycle;
17 \pgfmathparse{\d/cos(atan2(\flagwidth,\flaglength))}
18 \edef\y{\pgfmathresult}
19 \pgfmathparse{\d/sin(atan2(\flagwidth,\flaglength))}
20 \edef\x{\pgfmathresult}
21 \fill [red] (0,\y*1pt)--(0.5\flaglength-\x*1pt,0.5)--(0,\flagwidth-\y*1pt)--cycle;
22 \framecode{}
23 \end{flagdescription}