-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a wrapper around \duck@draw to turn it into a pic, seems to work
(but could do with more extensive testing - see duck_library.tex for tests). Also added a "super duck" with everything enabled. Minor modification to tikzducks.sty to allow unknown keys to be passed back to tikz or pgf, also removed bounding scope as that is put in place by the pic syntax.
- Loading branch information
Showing
3 changed files
with
141 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
\documentclass{article} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{ducks} | ||
|
||
%\usepackage{trace-pgfkeys} | ||
|
||
%\pgfkeystracelevel{trace} | ||
%\tikzset{duck/water=blue} | ||
%\pgfkeystracelevel{silent} | ||
|
||
\begin{document} | ||
|
||
\begin{tikzpicture} | ||
\draw (0,0) pic[duck/super duck] {duck}; | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
%\draw (4,0) pic[duck/water=blue] {duck}; | ||
\draw (0,0) pic[ | ||
duck/water=blue, | ||
duck/book={Animal Farm}, | ||
] {duck}; | ||
\draw (0,4) pic[ | ||
duck/water=blue, | ||
scale=2, | ||
duck/book={Animal Farm}, | ||
] {duck}; | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
\duck[book={Animal Farm}] | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
\duck[xscale=-1] | ||
\end{tikzpicture} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
\usepackage{tikzducks} | ||
|
||
|
||
% This is all that is needed ... | ||
\tikzset{ | ||
duck/.pic={% | ||
\duck@draw | ||
}, | ||
duck/.search also={,/tikz,/pgf}, | ||
} | ||
|
||
% A test duck with *everything* | ||
\tikzset{ | ||
/duck/.cd, | ||
super duck/.style={ | ||
duck/.cd, | ||
name=Donald, | ||
% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
water, | ||
% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
grumpy, | ||
% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
shorthair, | ||
longhair, | ||
crazyhair, | ||
recedinghair, | ||
eyebrow, | ||
beard, | ||
mohican, | ||
mullet, | ||
% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
tshirt, | ||
jacket, | ||
tie, | ||
cape, | ||
stripes, | ||
% Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
alien, | ||
hat, | ||
cap, | ||
santa, | ||
unicorn, | ||
magichat, | ||
chef, | ||
witch, | ||
graduate, | ||
beret, | ||
crown, | ||
queencrown, | ||
kingcrown, | ||
peakedcap, | ||
bunny, | ||
tophat, | ||
darthvader, | ||
% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
glasses, | ||
sunglasses, | ||
squareglasses, | ||
icecream, | ||
book, | ||
magicwand, | ||
cricket, | ||
rollingpin, | ||
signpost, | ||
lightsaber, | ||
cake, | ||
pizza, | ||
hockey, | ||
baguette, | ||
football, | ||
mask, | ||
necklace, | ||
milkshake, | ||
wine, | ||
prison, | ||
speech, | ||
think, | ||
torch, | ||
easter, | ||
basket, | ||
buttons, | ||
sheep, | ||
horsetail, | ||
crozier, | ||
davidlikespineapplepizza, | ||
} | ||
} |