\documentclass{mwart}

\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\input{NaszeLiczniki}
\input{ShapesPreamble}
\newcommand{\pik}{\ensuremath{\spadesuit}}
\newcommand{\trefl}{\ensuremath{\clubsuit}}
\newcommand{\kier}{\ensuremath{\heartsuit}}
\newcommand{\karo}{\ensuremath{\diamondsuit}}
\title{Rysowanie kształtów}

\begin{document}
\maketitle
\section{Bez użycia makrodefinicji}
\begin{tikzpicture}
  \pgftransformcm{1.42}{1.42}{-1.42}{1.42}{\pgfpoint{0}{0}}
  \draw rectangle(1, 1);
  \translate{0.5}{0.5}{1}
  \pgftext{\pik}
\end{tikzpicture}

\vspace{1cm}

\begin{tikzpicture}
  \pgftransformcm{4}{0}{0}{4}{\pgfpoint{0}{0}}
  \draw rectangle(1, 1);
  \translate{0.5}{0.5}{1}
  \pgftext{\trefl}
\end{tikzpicture}

\vspace{1cm}

\begin{tikzpicture}
  \pgftransformcm{6}{0}{0}{6}{\pgfpoint{0}{0}}
  \draw rectangle(1, 1);
  \translate{0.5}{0.5}{1}
  \pgftransformcm{0.16}{0}{0}{0.16}{\pgfpoint{0}{0}}
  \pgftext{\pgfimage{Colors_128}}
\end{tikzpicture}

\section{Z użyciem makrodefinicji}
\subsection{Makrodefinicje pomocnicze \textit{face} i \textit{unroundedface}}
\begin{tikzpicture}
  \face{\trefl}{yellow}{1}{1}{1}
  \pgftransformreset
  \pgftransformcm{1}{0}{0}{1}{\pgfpoint{4cm}{0cm}}
  \unroundedface{\pik}{blue!40!white}{1}{2}{1}
  \pgftransformreset
  \pgftransformcm{1}{0}{0}{1}{\pgfpoint{0cm}{-6cm}}
  \face{\pgfimage{Colors_128}}{blue!20!white}{-1}{5}{1}
\end{tikzpicture}

\subsection{,,Główne'' makrodefinicje}

\begin{verbatim}
\frontshapes{3}{0}{{\pik/green!20!white, \trefl/blue!20!white, \karo/green!20!white}}{2}{2}}
\end{verbatim}
\begin{tikzpicture}
  \frontshapes{3}{0}{{\pik/green!20!white, \trefl/blue!20!white, \karo/green!20!white}}{2}{2}
\end{tikzpicture}

\vspace{1cm}

\begin{verbatim}
\unroundedfrontshapes{0}{0}{{\pik/white, \trefl/blue!20!white, \pik/white}}{1.5}{1}
\unroundedfrontshapes{4}{0}{{\pik/white, \trefl/blue!20!white, \pik/white}}{1.5}{1.5}
\end{verbatim}
\begin{tikzpicture}
  \unroundedfrontshapes{0}{0}{{\pik/green!20!white, \trefl/blue!20!white, \pik/green!20!white}}{1.5}{1}
  \unroundedfrontshapes{4}{0}{{\pik/white, \trefl/blue!20!white, \pik/white}}{1.5}{1.5}
\end{tikzpicture}

\vspace{1cm}

\begin{verbatim}
\shapes{0}{0}{{\pik/red!20!white, \karo/blue!20!white, \kier/green!20!white}}{2}{3}
\end{verbatim}
\begin{tikzpicture}
  \shapes{0}{0}{{\pik/red!20!white, \karo/blue!20!white, \kier/green!20!white}}{2}{3}
\end{tikzpicture}

\vspace{1cm}

\begin{verbatim}
\unroundedshapes{0}{0}{{\kier/yellow, \kier/green!20!white, \pik/yellow}}{1}{1}
\end{verbatim}
\begin{tikzpicture}
  \unroundedshapes{0}{0}{{\kier/yellow, \kier/green!20!white, \pik/yellow}}{1}{1}
\end{tikzpicture}

\end{document}
