2

Is it possible to define text boxes with modifiable with and height which use a background image which should scale when you modify the width or height of the box. More complicated, it should be allowed in some way, that the background image has some elements which should scale and other which are not allowed to scale. For example consider something like this:

In that cases the pins for example should not scale, but the slip of paper should do.

diabonas
  • 25,784
student
  • 29,003

1 Answers1

3

Run it with xelatex. With the optional argument [showgrid] you can see a grid for better placing the objects.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Viner Hand ITC}
\usepackage{graphicx,pstricks}
\newsavebox\IBox
\pagestyle{empty}
\begin{document}

\savebox\IBox{\includegraphics{/tmp/demo.jpg}}
\begin{pspicture}%[showgrid]% only for showing the grid
   (\wd\IBox,\ht\IBox)
\rput[lb](0,0){\usebox\IBox}
\rput[l]{-5}(1.8,2.5){\small Birthday!}
\rput[l]{60}(1,2.5){\small\TeX!}
\end{pspicture}

\end{document}

enter image description here