March 6, 2018
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | \documentclass {beamer} \usepackage {tikz} \usepackage {graphicx} \usetikzlibrary {decorations.text} \begin {document} \begin {frame} \frametitle {Donut and Pictures} \begin {figure}[h] \centering \begin {tikzpicture} \newcommand *{ \myInnerRadius }{1cm} % \newcommand *{ \myOuterRadius }{3cm} % \newcommand *{ \myMidRadius }{2cm} % % three segments in donut \filldraw [fill=blue!30, draw=blue!50] (30: \myInnerRadius ) -- (30: \myOuterRadius ) arc (30:150: \myOuterRadius ) -- (150: \myInnerRadius ) arc (150:30: \myInnerRadius ); \filldraw [fill=red!30, draw=red!50] (30: \myInnerRadius ) -- (30: \myOuterRadius ) arc (30:-90: \myOuterRadius ) -- (-90: \myInnerRadius ) arc (-90:30: \myInnerRadius ); \filldraw [fill=green!30, draw=green!50] (150: \myInnerRadius ) -- (150: \myOuterRadius ) arc (150:270: \myOuterRadius ) -- (270: \myInnerRadius ) arc (270:150: \myInnerRadius ); % text around the donut \path [decoration={text along path, text={Random Text}, text align={align=center}, raise=1ex}, decorate] (150: \myOuterRadius ) arc (150:30: \myOuterRadius ); \path [decoration={text along path, text={Another Text}, text align={align=center}, raise=1ex}, decorate] (30: \myOuterRadius ) arc (30:-90: \myOuterRadius ); \path [decoration={text along path, text={Last Random Text}, text align={align=center}, raise=1ex}, decorate] (270: \myOuterRadius ) arc (270:150: \myOuterRadius ); % image \node (G1) at (0:0cm) { \includegraphics [height=15mm]{Figs/youtube.png}}; \node (G2) at (90: \myMidRadius ) { \includegraphics [height=15mm]{Figs/12.png}}; \node (G3) at (-30: \myMidRadius ) { \includegraphics [height=15mm]{Figs/6.png}}; \node (G4) at (210: \myMidRadius ) { \includegraphics [height=15mm]{Figs/linkedin.png}}; \end {tikzpicture} \end {figure} \end {frame} \end {document} |
Comments Off on Donut and Pictures