9

Can't able to rotate scope with external image (fig.pdf).

\begin{scope} [rotate=30]
    \node (scope6) at (0,0) {\includegraphics{/tmp/fig1}}; 
    \node at (0,0) [rotate=0,color=black] {Text};
 \end{scope}

Please help me to rotate this external image fig1.pdf

Zam
  • 313

2 Answers2

12

You need to add the [transform shape] option when creating the node.

\documentclass{standalone}
\usepackage{graphicx,tikz}
\begin{document}

\begin{tikzpicture}
  \begin{scope} [rotate=30]
    \node [transform shape](scope6) at (0,0) {\includegraphics{example-image}}; 
    \node at (0,0) [rotate=0,color=black] {Text};
  \end{scope}
\end{tikzpicture}

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
  • Thanks, works fine. I don't know why this "[transform shape]", it should rotate as we put rotate for scope. – Zam May 19 '16 at 10:18
1

Something like this:

enter image description here

For this scope doesn't work. You can simply do the following:

\documentclass[border=3mm,
               multi,
               tikz]{standalone}
\usepackage{graphicx}

    \begin{document}
\begin{tikzpicture}   
    \node[rotate=30,draw=red,very thick] (scope6) {\includegraphics{example-image}};
    \node [font=\bfseries\Huge,text=white] {Text};
\end{tikzpicture}
    \end{document}

I add border to node that you can see, how the node is aligned with image inside it.

Zarko
  • 296,517