summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pixelart
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-25 21:28:52 +0000
committerKarl Berry <karl@freefriends.org>2018-02-25 21:28:52 +0000
commiteaeb7e1215c6dac950bfdc884c48478ea36afdc3 (patch)
treeef1fb13adeafc18149117e0d9a752afac75a5317 /Master/texmf-dist/tex/latex/pixelart
parente18be612d01aa3905f88efab321f712f9fc478b6 (diff)
pixelart (25feb18)
git-svn-id: svn://tug.org/texlive/trunk@46740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pixelart')
-rw-r--r--Master/texmf-dist/tex/latex/pixelart/pixelart.sty28
1 files changed, 20 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/pixelart/pixelart.sty b/Master/texmf-dist/tex/latex/pixelart/pixelart.sty
index 229866d5146..ec702ee8036 100644
--- a/Master/texmf-dist/tex/latex/pixelart/pixelart.sty
+++ b/Master/texmf-dist/tex/latex/pixelart/pixelart.sty
@@ -23,9 +23,10 @@
%% and the derived file pixelart.sty.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pixelart}
- [2018/01/13 v0.1.2 A package to draw pixel-art pictures]
+ [2018/02/25 v0.2.0 A package to draw pixel-art pictures]
\RequirePackage{pgf}
+\RequirePackage{pgfopts}
\usepgfmodule{parser}
\RequirePackage{tikz}
\usetikzlibrary{calc}
@@ -34,6 +35,13 @@
\makeatletter
+\newif\ifpixelart@draft
+\pgfkeys{
+ /PIXELART/.cd,
+ draft/.is if=pixelart@draft,
+ draft=false,
+}
+\ProcessPgfPackageOptions{/PIXELART}
\pgfkeys{
/PIXELART/BWPIXELART/.is family,
/PIXELART/BWPIXELART,
@@ -93,15 +101,19 @@
\newcommand{\tikzbwpixelart}[3][]{
\pgfkeys{/PIXELART/TIKZBWPIXELART, #1}
- \begin{scope}[shift={#2}]
- \begin{scope}[#1]
- \coordinate (@pixelart) at (0, 1);
- \coordinate (@pixelart@startline) at (@pixelart);
+ \ifpixelart@draft
+ % Draft mode. Nothing to parse, nothing to show!
+ \else
+ \begin{scope}[shift={#2}]
+ \begin{scope}[#1]
+ \coordinate (@pixelart) at (0, 1);
+ \coordinate (@pixelart@startline) at (@pixelart);
- \pgfparserparse{@bwpixelart}
- #3 @
+ \pgfparserparse{@bwpixelart}
+ #3 @
+ \end{scope}
\end{scope}
- \end{scope}
+ \fi
}
\makeatother