From eaeb7e1215c6dac950bfdc884c48478ea36afdc3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 25 Feb 2018 21:28:52 +0000 Subject: pixelart (25feb18) git-svn-id: svn://tug.org/texlive/trunk@46740 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pixelart/pixelart.sty | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pixelart') 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 -- cgit v1.2.3