Donnerstag, 16. Juli 2015

cut out part of figure in tikz

To cut out a figure (here i used a rule instead) you can use a node shape as a cut out mask as shown in the following:

\begin{tikzpicture}
\node[regular polygon, path picture={
  \node at (path picture bounding box.center)
  { \rule{4cm}{3cm} };
}
,minimum width=2.5cm,minimum height=2cm] {};
\end{tikzpicture}

instead of \rule{width}{height} you can use a \includegraphics command.

For a rectangle be aware that you have to set the minimum width and minimum height the same size as the picture otherwise a white border will remain.


Keine Kommentare:

Kommentar veröffentlichen