I am having an issue when I use shift
and rotate
. In one case, the rectangle is being elongated down to the stopping point of the shift and rotate.
However, if I issue the same command in another case, the rectangle acts in the appropriate manner by rotating and shifting not elongating to the stopping point.
\documentclass[convert = false, tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\coordinate (O) at (0, 0);
\filldraw[outer color = blue!75!pink!60,
inner color = red!50!black!20, rotate = {-30}, shift = {(2, 0)}] (O) rectangle
(.75, .5);
\filldraw[red] (3, 0) rectangle (4, .75);
\filldraw[red, rotate = {45}, shift = {(1, 0)}] (3, 0) rectangle (4, .75);
\end{tikzpicture}
\end{document}
I would like the elongated rectangle to behave as the red rectangle. When I issue a rotate
and shift
, I want the rectangle to do just that not stretch to the spot.
This stretching only occurs with objects placed at the origin.
(O)
that causes the problem, because nodes aren't transformed. You can either use(0,0)
instead of(O)
, or you can apply the transformation to the node explicitly using\filldraw[outer color = blue!75!pink!60, inner color = red!50!black!20, rotate = {-30}, shift = {(2, 0)}] ([rotate = {-30}, shift = {(2, 0)}]O) rectangle (.75, .5);