Without clipping, the output position is correct:

enter image description here

With clipping, the output position is wrong as it gets shifted to the left:

enter image description here



    true setglobal
    globaldict begin
    /theta 76 def
    /Major 6.0 def
    /Minor 3.3 def
    /p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def
    false setglobal

        (!Minor Major theta p2c){I}%
        (!Minor Major theta neg p2c){J}%

    \psellipticarcn[dimen=middle](center)(!Major Minor){(I)}{(J)}%middle must be set!

    \psellipticarcn[dimen=middle](center)(!Major Minor){(J')}{(I')}%middle must be set!




  • No idea about PSTricks, but in TikZ this is usually because the bounding box includes the control points of bezier curves which makes it a bit bigger than the curve itself. If these are outside the clipping region, then clipping will change the bounding box. If the position is computed from the bounding box, it will then be changed. But this is all conjecture. – Loop Space Aug 2 '12 at 15:53
  • 1
    Not only the position is wrong, there are other details with introduce a small asymetry. Look at the right ear of the bat and the tip of the corresponding wing. Perhaps it is only a rendering problem? – JLDiaz Aug 4 '12 at 17:52
  • I get no shift after applying JLDiaz's correction. But pst-eucl has changed in the meantime. – egreg Dec 22 '13 at 16:43
  • @egreg: Because a bug in showgrid has been fixed. See the edit history. :-) – kiss my armpit Dec 22 '13 at 16:50

Disclaimer: I don't use pstricks nor I am able to understand the PostScript code you used to draw the batman figure, but nevertheless I think I can provide some clues about the problems with your example.

As said in a comment, shifting is not the only difference in the second figure, also an asymmetry is introduced. I thought that perhaps that was due to the declaration of the nodes before the clipping, so I tried moving the declaration of the nodes inside the psclip, like this:


With this, the asymmetry disappeared, but the shifting to the left became a small shifting to the right. I'm not sure about this because, for some unknown reason, I don't get the grid overimposed on the figures, so it is difficult to compare them.

This is what I get (I put \fbox around the grid to help myself):


Note that in my output an asymmetry is already present in the first figure, but the second one is identical (with \DeclareNodes before psclip the asymmetry was even more pronunced in the second figure).

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.