summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pixelart/pixelart.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pixelart/pixelart.sty')
-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