5

Possible Duplicate:
Moving tiles of the pattern in TikZ

I have a rotated rectangle filled with a pattern, and I would like to also rotate the pattern by the same amount.

In this MWE, the second node is a rotated rectangle, but its north east lines pattern is parallel to the first node's pattern.

Straight and rotated rectangles

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
  \node[draw, minimum size=0.5cm, rectangle, pattern=north east lines] at (0,0) {};
  \node[draw, minimum size=0.5cm, rectangle, pattern=north east lines, rotate=30] at (1cm,0) {};
\end{tikzpicture}
\end{document}
Suzanne Soy
  • 3,043
  • 1
    Unfortunately this is not easy, see http://tex.stackexchange.com/a/65270/86. In fact the answer is the same. Even transform canvas can not be used. – nickpapior Sep 04 '12 at 11:18
  • I didn't know that, I would have expected transform canvas to work (despite causing all sorts of other problems). I guess I should manually draw the pattern then. You can make this an answer, I'll accept it. – Suzanne Soy Sep 04 '12 at 11:23
  • I am trying to make it a duplicate. The answer provided in the linked question should suffice (no need for point spamming ;) ) Thank you! :) – nickpapior Sep 04 '12 at 11:25

0 Answers0