如何使用单个代码在 Tikz 中调整圆形图片下方的圆形文本?

如何使用单个代码在 Tikz 中调整圆形图片下方的圆形文本?

我已经用单独的代码对橙色图片和其下方的文本进行了编码。我怎样才能将它们放在一个代码中,以便一起移动和调整大小?(图片已在附件中重新缩放。)

\documentclass[6pt,border=1mm]{standalone}
\usepackage{tikz, pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
\begin{tikzpicture}
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\end{scope}
\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\draw [path picture={ \node at (path picture bounding box.center)
{\includegraphics[height=5cm, width=5cm]{photo}};}] (0,0) circle (2);
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center}, 
text=This is some random text}}] (0,0) circle (2cm);
\end{frame}  
\end{tikzpicture}
\end{document}

照片 在此处输入图片描述

答案1

我不知道这里的用途frame是什么,但除此之外,我认为你已经快到了。(另请注意,photo我的机器上的内容有所不同。;-)

\documentclass[6pt,border=1mm]{standalone}
\usepackage{tikz, pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
%\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\begin{tikzpicture}
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\clip (vecbox.center) circle(2);
\node at (vecbox.center)  {\includegraphics[height=5cm, width=5cm]{photo}};
\end{scope}
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center}, 
text=This is some random text}}] (vecbox.center) circle (2cm);
\end{tikzpicture}
%\end{frame}  
\end{document}

在此处输入图片描述

这个可以随意变换。

\documentclass[tikz,6pt,border=1mm]{standalone}
\usepackage{pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
%\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\foreach \X in {0,10,...,360}
{\pgfmathsetmacro{\SF}{0.75+0.25*cos(\X)}
\begin{tikzpicture}
\path[use as bounding box] (-3,-3) rectangle (3,3);
\begin{scope}[scale=\SF,transform shape]
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\clip (vecbox.center) circle(2);
\node at (vecbox.center)  {\includegraphics[height=5cm, width=5cm]{photo}};
\end{scope}
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center},
text=This is some random text}}] (vecbox.center) circle (2cm);
\end{scope}
\end{tikzpicture}}
%\end{frame}  
\end{document}

在此处输入图片描述

相关内容