summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-16 19:58:35 +0000
committerKarl Berry <karl@freefriends.org>2024-04-16 19:58:35 +0000
commitaed0605e8b3fa5b32269f312491b37c14c4294b9 (patch)
tree82c55a33f23ce4e77ed6bdfc08c08c81c202144d /Master
parentc6ac09395ef1c9b604f98438c43bc6d679ab5def (diff)
pixelarttikz (16apr24)
git-svn-id: svn://tug.org/texlive/trunk@70964 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PAsorciere.csv10
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PAyoda.csv10
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdfbin695668 -> 743791 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex158
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdfbin735970 -> 781013 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex186
-rw-r--r--Master/texmf-dist/tex/latex/pixelarttikz/PixelArtTikz.sty190
7 files changed, 536 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PAsorciere.csv b/Master/texmf-dist/doc/latex/pixelarttikz/PAsorciere.csv
new file mode 100644
index 00000000000..669f2dc22fe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PAsorciere.csv
@@ -0,0 +1,10 @@
+V,V,V,V,N,N,N,V,V,V
+V,V,V,N,N,N,N,N,V,V
+N,N,N,N,N,N,N,N,N,N
+V,V,V,G,G,G,O,O,V,V
+V,V,V,J,J,G,O,O,O,V
+V,V,G,N,J,G,O,O,O,V
+V,G,G,G,G,G,O,O,O,O
+V,V,N,N,N,G,O,O,O,O
+V,V,G,G,G,G,O,O,O,O
+V,V,V,V,N,N,O,O,O,O
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PAyoda.csv b/Master/texmf-dist/doc/latex/pixelarttikz/PAyoda.csv
new file mode 100644
index 00000000000..d46c263969e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PAyoda.csv
@@ -0,0 +1,10 @@
+E,E,E,A,A,E,A,A,E,D
+E,E,E,F,F,F,F,F,E,D
+E,E,E,F,F,C,F,F,E,D
+E,A,F,F,C,C,C,F,F,A
+E,A,F,F,C,C,C,F,F,A
+E,E,E,A,A,A,A,A,E,E
+E,E,E,A,A,A,A,A,E,E
+E,E,A,E,B,A,B,E,A,E
+E,A,A,A,A,A,A,A,A,A
+E,E,E,A,A,A,A,A,E,E
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf
index 5c53a4bbf0f..160751afc2e 100644
--- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex
index 9c3001979ad..ae34054bba9 100644
--- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-en.tex
@@ -45,8 +45,8 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.3}
-\def\TPdate{11/04/2024}
+\def\TPversion{0.1.4}
+\def\TPdate{16/04/2024}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -727,8 +727,162 @@ A,A,A,A,A,A,A,A,A,A,A,A,H,H,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,H,H,A,A,A,A
\pagebreak
+\section{Anamorphic cylinder PixelArt}
+
+\subsection{Idea}
+
+The idea is to provide something to create PixelArt with the aim of using a cylindrical anamorphosis.
+
+On \url{https://www.youtube.com/watch?v=PT8KUozBg3I}, there is a video \textit{demonstration}, proposed by Jean-Yves Labouche.
+
+The overall operation is similar to that of the \textit{main} command, however there are some adjustments:
+
+\begin{itemize}
+ \item the possibility of giving the file \textsf{csv} in \textit{normal} or \textit{inverted} mode;
+ \item the dimensions (width \& middle) must be specified to produce the PixelArt;
+ \item the command is standalone (for the moment) so no addition(s) later.
+\end{itemize}
+
+\begin{PresentationCode}{listing only}
+\PixlArtTikzCylindric[keys]{file.csv}
+\end{PresentationCode}
+
+The files illustrating this paragraph are given below.
+
+\begin{PresentationCode}{}
+%version with inverted data
+\begin{filecontents*}[overwrite]{PAyoda.csv}
+E,E,E,A,A,E,A,A,E,D
+E,E,E,F,F,F,F,F,E,D
+E,E,E,F,F,C,F,F,E,D
+E,A,F,F,C,C,C,F,F,A
+E,A,F,F,C,C,C,F,F,A
+E,E,E,A,A,A,A,A,E,E
+E,E,E,A,A,A,A,A,E,E
+E,E,A,E,B,A,B,E,A,E
+E,A,A,A,A,A,A,A,A,A
+E,E,E,A,A,A,A,A,E,E
+\end{filecontents*}
+
+\PixlArtTikz[%
+ Codes=ABCDEF,
+ Colors={green,black,brown,white,brown!75!black,lightgray},
+ Correction,Unit=0.35]%
+ {PAyoda.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%version with normal data
+\begin{filecontents*}{PAsorciere.csv}
+V,V,V,V,N,N,N,V,V,V
+V,V,V,N,N,N,N,N,V,V
+N,N,N,N,N,N,N,N,N,N
+V,V,V,G,G,G,O,O,V,V
+V,V,V,J,J,G,O,O,O,V
+V,V,G,N,J,G,O,O,O,V
+V,G,G,G,G,G,O,O,O,O
+V,V,N,N,N,G,O,O,O,O
+V,V,G,G,G,G,O,O,O,O
+V,V,V,V,N,N,O,O,O,O
+\end{filecontents*}
+
+\PixlArtTikz[%
+ Codes=VNGOJ,
+ Colors={purple!50,black,green,orange,yellow},
+ Correction,Unit=0.35]%
+ {PAsorciere.csv}
+\end{PresentationCode}
+
+\subsection{Keys and options}
+
+The first argument, \textit{optional} and between \texttt{[...]} offers \textsf{Keys} necessary for the command to function properly:
+
+\begin{itemize}
+ \item the key \Cle{Width} which defines the width (radius in cm) of the rendering;\hfill{}default \textsf{6}
+ \item the key \Cle{Center} which defines the width (radius in cm) of the \textit{middle};\hfill{}default \textsf{1.25}
+ \item the key \Cle{Codes} contains the \textit{string} of the \textit{simple} codes of the file \textsf{csv};
+ \item the key \Cle{Colors} which contains the \textit{list} of associated colors;
+ \item the key \Cle{Symbols} which contains the \textit{possible list} of alternative characters to display in the boxes;
+ \item the key \Cle{Style} which allows you to specify the style of characters. \hfill{}default \textsf{normalsize}
+ \item the Boolean key \Cle{Correction} which allows you to color the PixelArt;\hfill{}default \textsf{false}
+ \item the Boolean key \Cle{Symb} which allows you to display the \textit{alternative} characters;\hfill{}default \textsf{false}
+ \item the Boolean key \Cle{Solution} which displays the solution (with \textit{mirror} effect);\hfill{}default \textsf{false}
+ \item the Boolean key \Cle{Swap} which allows you to specify the data type (\Cle{true} := normal; \Cle{false} := inverted).
+
+ \hfill{}default \textsf{false}
+\end{itemize}
+
+The second argument, \textit{mandatory}, is the name of the \textsf{csv} file to use.
+
+\pagebreak
+
+\subsection{Example with inverted data (Yoda)}
+
+In this paragraph, we use the data \texttt{PAyoda}, which corresponds to the \textit{inverted} layout, so the key \Cle{Swap} is not necessary.
+
+\begin{PresentationCode}{}
+%classic version
+\PixlArtTikzCylindric[Codes=ABCDEF,Style=\small\ttfamily]{PAyoda.csv}
+
+%version with 'symbols'
+\PixlArtTikzCylindric[Codes=ABCDEF,Symbols={1,2,3,4,5,6},Symb,Style=\small\ttfamily]{PAyoda.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%Fix and solution
+\begin{tabular}{c}
+ \PixlArtTikzCylindric[%
+ Codes=ABCDEF,
+ Colors={green,black,brown,white,brown!75!black,lightgray},
+ Solution]%
+ {PAyoda.csv}
+ \\
+ \PixlArtTikzCylindric[%
+ Codes=ABCDEF,
+ Colors={green,black,brown,white,brown!75!black,lightgray},
+ Correction]%
+ {PAyoda.csv}
+\end{tabular}
+\end{PresentationCode}
+
+\pagebreak
+
+\subsection{Example with classic data (Witch)}
+
+In this paragraph, we use the data \texttt{PAsorciere}, which corresponds to the \textit{normal} layout, so the key \Cle{Swap} is necessary.
+
+\begin{PresentationCode}{}
+ %classic version
+ \PixlArtTikzCylindric[%
+ Width=4,Center=1,Codes=VNGOJ,
+ Colors={purple!50,black,green,orange,yellow},
+ Swap,Style=\ttfamily\scriptsize]%
+ {PAsorciere.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%Correction and solution
+\begin{tabular}{c}
+ \PixlArtTikzCylindric[%
+ Width=4,Center=0.75,Codes=VNGOJ,
+ Colors={purple!50,black,green,orange,yellow},
+ Swap,Solution]%
+ {PAsorciere.csv}
+ \\
+ \PixlArtTikzCylindric[%
+ Width=4,Center=0.75,Codes=VNGOJ,
+ Colors={purple!50,black,green,orange,yellow},
+ Swap,Correction]%
+ {PAsorciere.csv}
+\end{tabular}
+\end{PresentationCode}
+
+\newpage
+
\part{History}
+\verb|v0.1.4|~:~~~~Anamorphic cylinder PixelArts
+
\verb|v0.1.3|~:~~~~Cut PixelArts within several PixelArts
\verb|v0.1.2|~:~~~~\textit{mini-}PixelArts
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf
index a4dbde2b0c0..dba701f59d3 100644
--- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex
index 5af486a5aa3..94e9f30b37b 100644
--- a/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex
+++ b/Master/texmf-dist/doc/latex/pixelarttikz/PixelArtTikz-doc-fr.tex
@@ -44,8 +44,8 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.3}
-\def\TPdate{11 avril 2024}
+\def\TPversion{0.1.4}
+\def\TPdate{16 avril 2024}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -119,6 +119,10 @@
\smallskip
+{$\blacktriangleright$~~Des PixelArts avec anamorphose cylindrique, des \textit{mini-}PixelArts.}
+
+\smallskip
+
\vspace{1cm}
\begin{center}
@@ -157,10 +161,6 @@
\vspace{0.5cm}
-%\hfill{}\textit{Merci aux membres du groupe \faFacebook{} du \og Coin \LaTeX{} \fg{} pour leur aide et leurs idées !}
-
-%\hfill{}\textit{Merci à Denis Bitouzé et à Patrick Bideault pour leurs retours et idées !}
-
\vfill
\hrule
@@ -247,7 +247,7 @@ Il charge les packages et librairies suivantes :
\begin{itemize}
\item \texttt{tikz}, \texttt{xintexpr} et \texttt{xinttools};
- \item \texttt{xstring}, \texttt{xparse}, \texttt{simplekv} et \texttt{listofitems} ;
+ \item \texttt{xstring}, \texttt{simplekv} et \texttt{listofitems} ;
\item \texttt{multicol} (pour le \textit{découpage}).
\end{itemize}
@@ -287,7 +287,9 @@ Il existe trois manières de représenter un PixelArt :
\AideGrillePixelArtTikz(*)[Echelle]{fichier.csv}{découpage}
\end{PresentationCode}
-\section{Les couleurs}
+\section{Compléments}
+
+\subsection{Les couleurs}
Concernant les couleurs, l'utilisateur utilisera celles disponibles avec les packages chargés.
@@ -327,7 +329,7 @@ Les couleurs disponibles sans autre package sont donc :
Pour des couleurs \textit{francisées}, le package \texttt{couleurs-fr} pourra être utile.
-\section{Petit aparté sur les fichiers csv}
+\subsection{Petit aparté sur les fichiers csv}
\textsf{CSV} désigne un format de fichiers dont le rôle est de présenter des données séparées par des virgules. Il s'agit d'une manière simplifiée d'afficher des données afin de les rendre transmissibles d'un programme à un autre.
@@ -341,7 +343,7 @@ Il \underline{doit} être préparé avec des caractères (codes) \textit{simples
\pagebreak
-\part{Commandes et environnement}
+\part{Commandes principales}
\section{La commande principale}
@@ -361,10 +363,10 @@ On peut donc commencer par créer le fichier \textsf{csv} qui sera lu et interpr
\begin{PresentationCode}{}
%déclaration du fichier csv
\begin{filecontents*}[overwrite]{base.csv}
- A,B,C,D
- A,B,D,C
- B,A,D,C
- C,A,B,D
+A,B,C,D
+A,B,D,C
+B,A,D,C
+C,A,B,D
\end{filecontents*}
\end{PresentationCode}
@@ -784,6 +786,160 @@ Il existe également une commande dédiée pour le découpage automatique et la
\newpage
+\part{Commandes complémentaires}
+
+\section{PixelArt et anamorphose cylindrique}
+
+\subsection{Idée}
+
+L'idée est de proposer de quoi créer un PixelArt dans le but d'utiliser une anamorphose cylindrique.
+
+Sur \url{https://www.youtube.com/watch?v=PT8KUozBg3I}, il y a une vidéo \textit{démonstration}, proposée par Jean-Yves Labouche.
+
+Le fonctionnement global est similaire à celui de la commande \textit{principale}, il existe cependant quelques ajustements :
+
+\begin{itemize}
+ \item la possibilité de donner le fichier \textsf{csv} en mode \textit{normal} ou \textit{inversé} ;
+ \item les dimensions (largeur \& milieu) sont à préciser pour produire le PixelArt ;
+ \item la commande est autonome (pour le moment) donc pas d'ajout(s) ultérieurement.
+\end{itemize}
+
+\begin{PresentationCode}{listing only}
+\PixelArtTikzCylindre[clés]{fichier.csv}
+\end{PresentationCode}
+
+Les fichiers illustrant ce paragraphe sont donnés ci-dessous.
+
+\begin{PresentationCode}{}
+%version avec données inversées
+\begin{filecontents*}[overwrite]{PAyoda.csv}
+E,E,E,A,A,E,A,A,E,D
+E,E,E,F,F,F,F,F,E,D
+E,E,E,F,F,C,F,F,E,D
+E,A,F,F,C,C,C,F,F,A
+E,A,F,F,C,C,C,F,F,A
+E,E,E,A,A,A,A,A,E,E
+E,E,E,A,A,A,A,A,E,E
+E,E,A,E,B,A,B,E,A,E
+E,A,A,A,A,A,A,A,A,A
+E,E,E,A,A,A,A,A,E,E
+\end{filecontents*}
+
+\PixelArtTikz[%
+ Codes=ABCDEF,
+ Couleurs={green,black,brown,white,brown!75!black,lightgray},
+ Correction,Unite=0.35]%
+ {PAyoda.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%version avec données normales
+\begin{filecontents*}{PAsorciere.csv}
+V,V,V,V,N,N,N,V,V,V
+V,V,V,N,N,N,N,N,V,V
+N,N,N,N,N,N,N,N,N,N
+V,V,V,G,G,G,O,O,V,V
+V,V,V,J,J,G,O,O,O,V
+V,V,G,N,J,G,O,O,O,V
+V,G,G,G,G,G,O,O,O,O
+V,V,N,N,N,G,O,O,O,O
+V,V,G,G,G,G,O,O,O,O
+V,V,V,V,N,N,O,O,O,O
+\end{filecontents*}
+
+\PixelArtTikz[%
+ Codes=VNGOJ,
+ Couleurs={violet!50,black,green,orange,yellow},
+ Correction,Unite=0.35]%
+ {PAsorciere.csv}
+\end{PresentationCode}
+
+\subsection{Clés et options}
+
+Le premier argument, \textit{optionnel} et entre \texttt{[...]} propose des \textsf{Clés} nécessaires au bon fonctionnement de la commande :
+
+\begin{itemize}
+ \item la clé \Cle{Largeur} qui définir la largeur (rayon en cm) du rendu ;\hfill{}défaut \textsf{6}
+ \item la clé \Cle{Centre} qui définir la largeur (rayon en cm) du \textit{milieu} ;\hfill{}défaut \textsf{1.25}
+ \item la clé \Cle{Codes} contient la \textit{chaîne} des codes \textit{simples} du fichier \textsf{csv} ;
+ \item la clé \Cle{Couleurs} qui contient la \textit{liste} des couleurs associées ;
+ \item la clé \Cle{Symboles} qui contient la \textit{liste éventuelles} des caractères alternatifs à afficher dans les cases ;
+ \item la clé \Cle{Style} qui permet de spécifier le style des caractères. \hfill{}défaut \textsf{normalsize}
+ \item la clé booléenne \Cle{Correction} qui permet de colorier le PixelArt ;\hfill{}défaut \textsf{false}
+ \item la clé booléenne \Cle{Symb} qui permet d'afficher les caractères \textit{alternatifs} ;\hfill{}défaut \textsf{false}
+ \item la clé booléenne \Cle{Solution} qui permet d'afficher la solution (avec effet \textit{mirroir}) ;\hfill{}défaut \textsf{false}
+ \item la clé booléenne \Cle{Swap} qui permet de spécifier le type de données (\Cle{true} := normal ; \Cle{false} := inversé).
+
+ \hfill{}défaut \textsf{false}
+\end{itemize}
+
+Le deuxième argument, \textit{obligatoire}, est le nom du fichier \textsf{csv} à utiliser.
+
+\pagebreak
+
+\subsection{Exemple avec données inversées (Yoda)}
+
+Dans ce paragraphe, on utilise les données \texttt{PAyoda}, qui correspondent à la disposition \textit{inversée}, donc la clé \Cle{Swap} n'est pas nécessaire.
+
+\begin{PresentationCode}{}
+%version classique
+\PixelArtTikzCylindre[Codes=ABCDEF,Style=\small\ttfamily]{PAyoda.csv}
+
+%version avec 'symboles'
+\PixelArtTikzCylindre[Codes=ABCDEF,Symboles={1,2,3,4,5,6},Symb,Style=\small\ttfamily]{PAyoda.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%Correction et solution
+\begin{tabular}{c}
+ \PixelArtTikzCylindre[%
+ Codes=ABCDEF,
+ Couleurs={green,black,brown,white,brown!75!black,lightgray},
+ Solution]%
+ {PAyoda.csv}
+ \\
+ \PixelArtTikzCylindre[%
+ Codes=ABCDEF,
+ Couleurs={green,black,brown,white,brown!75!black,lightgray},
+ Correction]%
+ {PAyoda.csv}
+\end{tabular}
+\end{PresentationCode}
+
+\pagebreak
+
+\subsection{Exemple avec données classiques (Sorcière)}
+
+Dans ce paragraphe, on utilise les données \texttt{PAsorciere}, qui correspondent à la disposition \textit{normale}, donc la clé \Cle{Swap} est nécessaire.
+
+\begin{PresentationCode}{}
+%version classique
+\PixelArtTikzCylindre[%
+ Largeur=4,Centre=1,Codes=VNGOJ,
+ Couleurs={violet!50,black,green,orange,yellow},
+ Swap,Style=\ttfamily\scriptsize]%
+ {PAsorciere.csv}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%Correction et solution
+\begin{tabular}{c}
+ \PixelArtTikzCylindre[%
+ Largeur=4,Centre=0.75,Codes=VNGOJ,
+ Couleurs={violet!50,black,green,orange,yellow},
+ Swap,Solution]%
+ {PAsorciere.csv}
+ \\
+ \PixelArtTikzCylindre[%
+ Largeur=4,Centre=0.75,Codes=VNGOJ,
+ Couleurs={violet!50,black,green,orange,yellow},
+ Swap,Correction]%
+ {PAsorciere.csv}
+\end{tabular}
+\end{PresentationCode}
+
+\newpage
+
\section{La commande pour un \textit{mini-}PixelArt}
\subsection{Idée}
@@ -956,6 +1112,8 @@ Il est également possible de créer le tableau \textit{manuellement}, avec une
\part{Historique}
+\verb|v0.1.4|~:~~~~PixelArts avec anamorphose cylindrique
+
\verb|v0.1.3|~:~~~~Possibilité de créer des PixelArts collaboratifs
\verb|v0.1.2|~:~~~~Possibilité de créer des \textit{mini-}PixelArts
diff --git a/Master/texmf-dist/tex/latex/pixelarttikz/PixelArtTikz.sty b/Master/texmf-dist/tex/latex/pixelarttikz/PixelArtTikz.sty
index 882b1ecffa1..711b0e919ae 100644
--- a/Master/texmf-dist/tex/latex/pixelarttikz/PixelArtTikz.sty
+++ b/Master/texmf-dist/tex/latex/pixelarttikz/PixelArtTikz.sty
@@ -2,7 +2,8 @@
% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{PixelArtTikz}[2024/04/11 v0.1.3 PixelArts with csv and TikZ]
+\ProvidesPackage{PixelArtTikz}[2024/04/16 v0.1.4 PixelArts with csv and TikZ]
+% 0.1.4 Cylinder anamorphic pixelart
% 0.1.3 Split PA into grid
% 0.1.2 Mini pixerlart
% 0.1.1 Small bugfix with color
@@ -16,7 +17,6 @@
%------Packages utiles
\RequirePackage{tikz}
-\RequirePackage{xparse}
\RequirePackage{simplekv}
\RequirePackage{xintexpr}
\RequirePackage{xinttools}
@@ -847,5 +847,191 @@
\SetCell{bg=#2,fg=#1}#3
}
+%====ANAMORPHIC CYLINDER PixelArt [fr]
+\defKV[PixelArtCylinder]{
+ Largeur=\def\AAanamcyllarg{#1},%
+ Centre=\def\AAanamcylcenter{#1},%
+ Codes=\def\PATAAlettres{#1},%
+ Couleurs=\def\PATAAcouleurs{#1},%
+ Symboles=\def\PATAAchiffres{#1},%
+ Style=\def\PATAAtaille{#1}
+}
+\setKVdefault[PixelArtCylinder]{
+ Largeur=6,%
+ Centre=1.25,%
+ Symb=false,%
+ Correction=false,%
+ Style=\normalsize,%
+ Solution=false,%
+ Swap=false
+}
+\NewDocumentCommand\PixelArtTikzCylindre{ O{} m }{%
+ \restoreKV[PixelArtCylinder]%
+ \setKV[PixelArtCylinder]{#1}%
+ \csvreader{#2}{}{}%en test
+ \xdef\NbLigTot{\thecsvinputline}%
+ \xdef\NbColTot{\thecsvcolumncount}%
+ \xdef\CylindAng{\xintfloateval{round(180/\NbColTot,4)}}%\CylindNbsections~%
+ \xdef\CylindSect{\xintfloateval{round((\AAanamcyllarg-\AAanamcylcenter)/(\NbLigTot-1),4)}}%\CylindNbhauteurs%
+ \ifboolKV[PixelArtCylinder]{Solution}%
+ {%
+ \ifboolKV[PixelArtCylinder]{Swap}%
+ {\PixelArtTikz[#1,Correction,Unite=\CylindSect]{#2}}%
+ {\PixelArtTikz[#1,Correction,Unite=\CylindSect]<yscale=-1>{#2}}%
+ }%
+ {%
+ \begin{tikzpicture}[line join=round]
+ \csvloop{file=#2,no head,command={%
+ \foreach \l [count=\nnnn] in \csvline {%
+ \StrDel{\l}{ }[\l]%
+ \StrPosition{\PATAAlettres}{\l}[\pixcnt]%
+ \xintifboolexpr{\pixcnt>0}%
+ {%
+ \ifboolKV[PixelArtCylinder]{Correction}%
+ {%
+ \setsepchar{,}%
+ \readlist*\LCPA\PATAAcouleurs%
+ \itemtomacro\LCPA[\pixcnt]\pixcol%
+ \ifboolKV[PixelArtCylinder]{Swap}%
+ {%
+ \draw[fill=\pixcol] ({(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-1)*\CylindSect}) arc({(\nnnn-1)*\CylindAng}:{(\nnnn)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-1)*\CylindSect})--++ ({(\nnnn)*\CylindAng}:{\CylindSect}) arc({(\nnnn)*\CylindAng}:{(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow)*\CylindSect}) ;%
+ }%
+ {%
+ \draw[fill=\pixcol] ({(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-\thecsvrow*\CylindSect}) arc({(\nnnn-1)*\CylindAng}:{(\nnnn)*\CylindAng}:{-\AAanamcylcenter-\thecsvrow*\CylindSect})--++ ({(\nnnn)*\CylindAng}:{\CylindSect}) arc({(\nnnn)*\CylindAng}:{(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-1)*\CylindSect}) ;%
+ }%
+ }%
+ {%
+ \ifboolKV[PixelArtCylinder]{Symb}%
+ {%
+ \setsepchar{,}%
+ \readlist*\LCNA\PATAAchiffres%
+ \StrPosition{\PATAAlettres}{\l}[\pixpos]%
+ \itemtomacro\LCNA[\pixpos]\pixchf%
+ \ifboolKV[PixelArtCylinder]{Swap}%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ }%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ }%
+ }%
+ {%
+ \ifboolKV[PixelArtCylinder]{Swap}%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\l};%
+ }%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\l};%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ %création de la grille en surimpression
+ \draw ({-\AAanamcyllarg},0)--({\AAanamcyllarg},0) arc (0:-180:\AAanamcyllarg) ;
+ \foreach \agl in {0,-\CylindAng,...,-180}{\draw (\agl:\AAanamcylcenter)--(\agl:\AAanamcyllarg) ;}
+ \foreach \sector in {0,\CylindSect,...,\xintfloateval{\AAanamcyllarg-\AAanamcylcenter}}{%
+ \draw ({\AAanamcylcenter+\sector},0) arc (0:-180:{\AAanamcylcenter+\sector}) ;
+ }%
+ \end{tikzpicture}%
+ }%
+}
+
+%====ANAMORPHIC CYLINDER PixelArt [en]
+\defKV[PixlArtCylinder]{
+ Width=\def\AAanamcyllarg{#1},%
+ Center=\def\AAanamcylcenter{#1},%
+ Codes=\def\PATAAlettres{#1},%
+ Colors=\def\PATAAcouleurs{#1},%
+ Symbols=\def\PATAAchiffres{#1},%
+ Style=\def\PATAAtaille{#1}
+}
+\setKVdefault[PixlArtCylinder]{
+ Width=6,%
+ Center=1.25,%
+ Symb=false,%
+ Correction=false,%
+ Style=\normalsize,%
+ Solution=false,%
+ Swap=false
+}
+\NewDocumentCommand\PixlArtTikzCylindric{ O{} m }{%
+ \restoreKV[PixlArtCylinder]%
+ \setKV[PixlArtCylinder]{#1}%
+ \csvreader{#2}{}{}%en test
+ \xdef\NbLigTot{\thecsvinputline}%
+ \xdef\NbColTot{\thecsvcolumncount}%
+ \xdef\CylindAng{\xintfloateval{round(180/\NbColTot,4)}}%\CylindNbsections~%
+ \xdef\CylindSect{\xintfloateval{round((\AAanamcyllarg-\AAanamcylcenter)/(\NbLigTot-1),4)}}%\CylindNbhauteurs%
+ \ifboolKV[PixlArtCylinder]{Solution}%
+ {%
+ \ifboolKV[PixlArtCylinder]{Swap}%
+ {\PixlArtTikz[#1,Correction,Unit=\CylindSect]{#2}}%
+ {\PixlArtTikz[#1,Correction,Unit=\CylindSect]<yscale=-1>{#2}}%
+ }%
+ {%
+ \begin{tikzpicture}[line join=round]
+ \csvloop{file=#2,no head,command={%
+ \foreach \l [count=\nnnn] in \csvline {%
+ \StrDel{\l}{ }[\l]%
+ \StrPosition{\PATAAlettres}{\l}[\pixcnt]%
+ \xintifboolexpr{\pixcnt>0}%
+ {%
+ \ifboolKV[PixlArtCylinder]{Correction}%
+ {%
+ \setsepchar{,}%
+ \readlist*\LCPA\PATAAcouleurs%
+ \itemtomacro\LCPA[\pixcnt]\pixcol%
+ \ifboolKV[PixlArtCylinder]{Swap}%
+ {%
+ \draw[fill=\pixcol] ({(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-1)*\CylindSect}) arc({(\nnnn-1)*\CylindAng}:{(\nnnn)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-1)*\CylindSect})--++ ({(\nnnn)*\CylindAng}:{\CylindSect}) arc({(\nnnn)*\CylindAng}:{(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow)*\CylindSect}) ;%
+ }%
+ {%
+ \draw[fill=\pixcol] ({(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-\thecsvrow*\CylindSect}) arc({(\nnnn-1)*\CylindAng}:{(\nnnn)*\CylindAng}:{-\AAanamcylcenter-\thecsvrow*\CylindSect})--++ ({(\nnnn)*\CylindAng}:{\CylindSect}) arc({(\nnnn)*\CylindAng}:{(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-1)*\CylindSect}) ;%
+ }%
+ }%
+ {%
+ \ifboolKV[PixlArtCylinder]{Symb}%
+ {%
+ \setsepchar{,}%
+ \readlist*\LCNA\PATAAchiffres%
+ \StrPosition{\PATAAlettres}{\l}[\pixpos]%
+ \itemtomacro\LCNA[\pixpos]\pixchf%
+ \ifboolKV[PixlArtCylinder]{Swap}%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ }%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ }%
+ }%
+ {%
+ \ifboolKV[PixlArtCylinder]{Swap}%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\l};%
+ }%
+ {%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\l};%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ %création de la grille en surimpression
+ \draw ({-\AAanamcyllarg},0)--({\AAanamcyllarg},0) arc (0:-180:\AAanamcyllarg) ;
+ \foreach \agl in {0,-\CylindAng,...,-180}{\draw (\agl:\AAanamcylcenter)--(\agl:\AAanamcyllarg) ;}
+ \foreach \sector in {0,\CylindSect,...,\xintfloateval{\AAanamcyllarg-\AAanamcylcenter}}{%
+ \draw ({\AAanamcylcenter+\sector},0) arc (0:-180:{\AAanamcylcenter+\sector}) ;
+ }%
+ \end{tikzpicture}%
+ }%
+}
+
\endinput \ No newline at end of file