1

I would like to draw a frame around a TikZ circle that is filled with a picture. Importantly, the code should follow the MWE below (if possible), since it is copied from a larger class definition, and I will probably not be able to integrate a different solution into the original code without running into new problems.

Here goes the MWE:

\documentclass{article}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{arrows}
\usetikzlibrary{backgrounds}
\RequirePackage[skins]{tcolorbox}

\begin{document}

\tikz\path[fill overzoom image={some_picture}]circle[radius=0.5\linewidth];

\end{document}

Any help is much appreciated!

  • 1
    How precisely should the frame look like? As far as I can see, your code already clips the image. What would you like to add? – marmot Oct 30 '18 at 23:18
5

Something like this?

enter image description here

If you have a few of these then it is a good idea to wrap the code in a macro, as this ensures both uniformity and improves readability. Here's the code:

\documentclass{article}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{arrows}
\usetikzlibrary{backgrounds}
\RequirePackage[skins]{tcolorbox}

\usepackage{mwe}% for an example image

\newcommand\CircledImage[1]{%
\tikz\path[fill overzoom image={#1}, draw=blue, line width=2mm]circle[radius=0.5\linewidth];%
}
\begin{document}

\CircledImage{example-image}

\end{document}
  • Perfect, just what I was looking for! Many thanks! – Jann Go Oct 30 '18 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.