Tikz的旋转默认的参考点是(0,0)
这个点,如果需要选定其他的点作为旋转点可以用rotate around
参数选择即可。具体使用参看下面的示例即可明了:
代码如下:
测试旋转:\\ \begin{tikzpicture}[line width =2pt] %原始图 \draw[dashed] (0,0) rectangle (2,2); %旋转45度,取默认旋转点 \draw[rotate=45] (0,0) rectangle (2,2); %旋转45度,指定旋转点(2,2) \draw[rotate around={45:(2,2)},blue] (0,0) rectangle (2,2); %辅助信息 \draw[fill=red] (0,0) circle (4pt); \draw[fill=green](2,2) circle (4pt); \node[below] (nodea) at (0,0){$(0,0)$}; \node[above] (nodeb) at (2,2){$(2,2)$}; \end{tikzpicture}效果图如下: 选自:http://blog.csdn.net/rumswell/article/details/8732105
发表评论 取消回复