7

I would like to use the Photo Clipper shape of kiss my armpit that they provided as an answer to Can we make a love heart with LaTeX?. However, I would like to have the background around the heart in red (except for the picture). Can anyone help me with that one?

\documentclass[border=12pt,pstricks]{standalone}
\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics{pretty}}
\usepackage{pst-plot}

\def\x(#1){sin(#1)^3}
\def\y(#1){(13*cos(#1)-5*cos(2*#1)-2*cos(3*#1)-cos(4*#1))/16}

\psset
{
    algebraic,
    plotpoints=100,
    xunit=.5\wd\IBox,
    yunit=.5\ht\IBox,
}

\usepackage{mathtools}
\begin{document}

\begin{pspicture}[showgrid=false](-1,-1)(1,1.5)
\begin{psclip}{\psparametricplot[origin={0,0.15}]{0}{\psPiTwo}{\x(t)|\y(t)}}
\rput(0,0){\usebox\IBox}
\end{psclip}
\rput(0,1.25){%
    \color{red}\large
    $\displaystyle\!
    \begin{aligned}
%        x(t)&=\sin^3 t\\
%        y(t)&=(13\cos t -5\cos 2t -2\cos 3t -\cos 4t)/16
    \end{aligned}$}
\rput(0,1){
%HAPPY BIRTHDAY
}
\end{pspicture}

\end{document}
  • 1
    Isn’t this a duplicate of this other question of yours? Please don’t ask the same question twice: wait patiently until someone is willing to answer. – GuM Jun 12 '17 at 23:19
  • 1
    The first question was about getting a result and it was answered in the comment section by Ignasi & Huang_d. Now, I need to change the result. – Philip Jun 12 '17 at 23:26
  • 1
    Fair enough. Nonetheless, consider whether this question could be better merged into the previous one, as an edit. – GuM Jun 12 '17 at 23:29
  • What do you mean by "everything red"? You mean the white background around the heart? – Alan Munn Jun 12 '17 at 23:42
  • It was about the background around the heart, thanks! – Philip Jun 13 '17 at 11:09
11

You can use the pagecolor package to do this:

\documentclass[border=12pt,pstricks]{standalone}
\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics{duck}}
\usepackage{pst-plot}
\usepackage{pagecolor}
\pagecolor{red}

\def\x(#1){sin(#1)^3}
\def\y(#1){(13*cos(#1)-5*cos(2*#1)-2*cos(3*#1)-cos(4*#1))/16}

\psset
{
    algebraic,
    plotpoints=100,
    xunit=.5\wd\IBox,
    yunit=.5\ht\IBox,
}

\usepackage{mathtools}
\begin{document}
\begin{pspicture}[showgrid=false](-1,-1)(1,1.5)
\begin{psclip}{\psparametricplot[origin={0,0.15}]{0}{\psPiTwo}{\x(t)|\y(t)}}
\rput(0,0){\usebox\IBox}
\end{psclip}
\end{pspicture}

\end{document}

output of code

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.