I am creating a class that I will use for my notes and, as the front page, I intended to have a fractal running through the diagonal of the page and the two parts created by the path, filled with different colors.
As you can see in the image I managed to get the fractal but the fill does not properly work. I have tried different approaches: using \filldraw
while creating the fractal, using path picture
as shown in this question and answer, clipping and more but none of them gave different results than what you can see in the following picture.
This picture was created by the following code:
\documentclass{article}
\usepackage{tikzpagenodes}
\usetikzlibrary{decorations.fractals}
\begin{document}
\begin{tikzpicture}[overlay, remember picture]
\fill[blue] (current page.north west) rectangle (current page.south east);
\filldraw[fill=red,decoration=Koch curve type 2,draw=white,very thick]
decorate {
decorate {
decorate {
(current page.north west) --
(current page.south east)
}
}
};
\end{tikzpicture}
\end{document}
I am then trying to understand how I can properly achieve what I want. What options are there? Thanks for your time!
};
by} -- (current page.south west) -- cycle;
do what you want?\fill
with the coordinates you gave me and one\draw
with only the diagonal. Are there any other solutions?\fill[fill=red,decoration=Koch curve type 2]
with Phelype's modification and thendraw[decoration=Koch curve type 2,draw=white,very thick] ...
with our original path. Of course you can do it in one path, too, if you either clip or just go beyond the page boundaries without clipping. Then you need to replace;
in your code by-- ++ (0,-1) -| ([xshift=-1cm,yshift=1cm]current page.north west);
.