Skip to content

Commit

Permalink
Merge pull request #11 from EagleoutIce/9-filled-drawing-style
Browse files Browse the repository at this point in the history
fill style
  • Loading branch information
EagleoutIce authored Jul 27, 2022
2 parents a5dcfb5 + 88a50f3 commit 3bae501
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 10 additions & 2 deletions documentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
language={[LaTeX]TeX},
moreemph={tikzpicture},
alsoletter={.-!:0123456789},%disable number
% moreemph=[4]{:line,:ghost,parts,:devil,:back,:hide},
deletetexcs={begin,end}, % -> lift 3
moretexcs=[2]{pingu,duck,node,pingudefaults,pingudefaultsappend,pinguloadlibrary,pinguloadlibraries},
moretexcs=[3]{begin,end},
Expand Down Expand Up @@ -480,7 +479,7 @@ \subsection{Predefined Styles}
\begin{multicols}{2}
\begin{itemize}
\itemsep0pt
\foreach \tx/\s in {{draw everything with a line}/{:line}, {draw components with transparency}/{:ghost parts}, {draw all layers with transparency}/{:ghost}, {set main \say{devil}-components}/{:devil},{flip the penguin (swaps left \& right)}/{:back},{do not draw main pingu}/{:hide}} {
\foreach \tx/\s in {{draw everything with a line}/{:line}, {fill main penguin}/{:fill}, {draw components with transparency}/{:ghost parts}, {draw all layers with transparency}/{:ghost}, {set main \say{devil}-components}/{:devil},{flip the penguin (swaps left \& right)}/{:back},{do not draw main pingu}/{:hide}} {
\item \parbox[t]{.8\linewidth}{\raggedright\texttt{\s}, \tx.} \hfill
\parbox[t]{.175\linewidth}{\scalebox{.4}{%
\begin{tikzpicture}[baseline=.35\baselineskip]%
Expand Down Expand Up @@ -1017,6 +1016,15 @@ \subsection{Drawing Styles}
\end{tcblisting}
\endkeyexplain

\keyexplain{:fill}{}{}
Makes the whole penguin in one solid color (basically a shortcut for setting all main penguin colors to the same):
\begin{tcblisting}{@}
\begin{tikzpicture}
\pingu[:fill]
\end{tikzpicture}
\end{tcblisting}
\endkeyexplain

\keyexplain{:ghost parts}{opacity}{.5}
Set the opacity of each penguin component individually. At the moment, this
excludes some glow calculations.
Expand Down
6 changes: 4 additions & 2 deletions tikzpingus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,14 @@
\newif\if@pingu@do@back@
\pgfqkeys{/pingu}{
:line/.style = {/pingu/@block/.append style={fill=none,draw=##1!80!black,shade=none,path fading=none}},
:fill/.style = {/pingu/body=#1,/pingu/body front=#1,/pingu/feet color=#1, /pingu/bill color=#1, /pingu/eyes color=#1, /pingu/eyes second color=#1},
:fill/.default = pingu@main,
:ghost parts/.style = {/pingu/@pingu@all/.append style={opacity={#1}}},
:ghost parts/.default = {.5},
:ghost/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group}},
:ghost/.default = {.5},
:ghost glow/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group},/pingu/@block/.append style={/pingu/@glow}},
:ghost glow/.default = {.5},
:ghost glow/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group},/pingu/@block/.append style={/pingu/@glow}},
:ghost glow/.default = {.5},
:devil/.style = {/pingu/devil horns=#1,/pingu/eyes devil=#1},
:devil/.default = pingu@purple,
:hide/.style = {/pingu/body type=none,/pingu/hair=\@pingu@none,/pingu/feet=none,/pingu/wings=none,/pingu/bill=none,/pingu/eyes=none},
Expand Down

0 comments on commit 3bae501

Please sign in to comment.