On 23-6-2011 6:32, Jeong Dalyoung wrote:
Hi all,

I got the reason why the pictures locate in different position.
"rotation" causes the problem.

I defined domino as follows.
It is not the exact code but just show the form of the codes.

....
def domino (a, b, c, d  )
        save pic;
        picture pic;
        draw something 1;
        draw something 2;
        pic := currentpicture;
        draw pic rotated 90 shifted ( c, d );
enddef;

and call it using

\startbuffer[domino3]
        domino (1, 2, 3, 4);
        domino (2, 1, 1, 2);
        domino (3, 3, 2, 3);
\stopbuffer

and \processMPbuffer[].

it draw the first domino at the right place, but it is rotated when the second 
domino is drawn. Hence, it actually rotated 180 degree. Also two dominos 
rotated again when the third domino is drawn.
Previous drawings are rotated again again when the function domino called.

How to avoid this problem? How to draw one figure and move to wanted position 
and draw another figure and move to another location without changing the 
previous figure?

If you want to see the whole codes, please see the attachment in the previous 
mail in ntg-context Digest, Vol 84, Issue 94.

set the boundingbox in each domino to the same size

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to