Henning Haida | 16 Mar 13:05
Picon

Node with clipped background image and arbitrary shape

Hi all,

I'd like to set a node with a background image (external graphic file)
and the image should be clipped to the fit the node's shape and size.
Basically it works, unfortunately I can not fit the shape of the node.

Here's an example, sorry, one has to add an image file to get it working:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds,fit}
\begin{document}
\begin{tikzpicture}
\node[draw, tape] (p1) {Text};
\begin{pgfonlayer}{background}
    \clip (p1.south east) rectangle (p1.north west);
    %\path[clip] node[shape=tape, fit=(p1.south east) (p1.north west)]
at (p1) {};
    \node at (p1) {\includegraphics{bg}};
\end{pgfonlayer}
\end{tikzpicture}
\end{document}

Any hints are appreciated.

Regards,
 Henning

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

Gmane