I am trying to place an image (in this case, a red square) at the center of a radial glow (generated as a tikzpicture) all within a pspicture environment.

Consider the code


% Code can be compiled with Pdflatex or Xelatex


\tikzfading[name=fade out, inner color=transparent!0,
outer color=transparent!100]
  star/.style={darkamber, fill=white, path fading=fade out}

  \draw[darkamber, shading=mradial, inner color=topaz, 
  middle color=darkamber!60!sunriseyellow, outer color=darkamber]
 (0, 0) rectangle (6, 6);
\clip (0, 0) rectangle (6, 6);

which produces

enter image description here

I do not know why the red square appears outside the specified dimensions of the pspicture, as I have place the \rput command prior to ending the pspicture.

Perhaps my approach to centering the red square at the point (3,3) within the pspicture is incorrect.

I would appreciate it if someone would suggest how to center the red square within the radial glow in the pspicture. Thank you.


Your Answer

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

Browse other questions tagged or ask your own question.