[NTG-context] Rotating an image

Fabrice Couvreur fabrice1.couvreur at gmail.com
Thu Oct 15 18:36:56 CEST 2015


Hi Wolfgang,
Why is it necessary to add currentpicture := nullpicture ; ?
Thank you,
Fabrice

2015-10-15 17:27 GMT+02:00 Wolfgang Schuster <schuster.wolfgang at gmail.com>:

> Fabrice Couvreur <fabrice1.couvreur at gmail.com>
> 12. Oktober 2015 um 20:58
> A small question not directly related context.
> I would like to turn my image 15 degrees.
> Thanks,
> Fabrice
>
> picture pic ;
> pic := currentpicture ;
> u := 0.5cm ;
> z1 = origin ;
> z2 = (9u, 0) ;
> path p ;
> p := fullcircle scaled 14u ;
> path q ;
> q := p shifted (9u,0) ;
> pair A ;
> A := p intersectionpoint q ;
> path a ;
> a := z1 -- z2 ;
> path b ;
> b := z1 -- A ;
> path c ;
> c := z2 -- A ;
> draw a ;
> draw b ;
> draw c ;
> pair I ;
> pair J ;
> I := point 0.6 of b ;
> J := point 0.6 of c ;
> draw I -- J ;
> pair L ;
> L := point 0.8 of b ;
> label.top("A", A) ;
> label.lrt("C", z2) ;
> label.llft("B", origin) ;
> label.ulft("I", I) ;
> label.urt("J", J) ;
> label.ulft("$x$", L) ;
> draw pic rotated 15 ;
>
> \startMPpage
> picture pic ;
>
> u := 0.5cm ;
> z1 = origin ;
> z2 = (9u, 0) ;
> path p ;
> p := fullcircle scaled 14u ;
> path q ;
> q := p shifted (9u,0) ;
> pair A ;
> A := p intersectionpoint q ;
> path a ;
> a := z1 -- z2 ;
> path b ;
> b := z1 -- A ;
> path c ;
> c := z2 -- A ;
> draw a ;
> draw b ;
> draw c ;
> pair I ;
> pair J ;
> I := point 0.6 of b ;
> J := point 0.6 of c ;
> draw I -- J ;
> pair L ;
> L := point 0.8 of b ;
> label.top("A", A) ;
> label.lrt("C", z2) ;
> label.llft("B", origin) ;
> label.ulft("I", I) ;
> label.urt("J", J) ;
> label.ulft("$x$", L) ;
> pic := currentpicture ;
> currentpicture := nullpicture;
> draw pic rotated 15 ;
> \stopMPpage
>
> You can also rotate the image when you place it in your document with
> \rotate[rotation=15]{...}.
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at 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
>
> ___________________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20151015/5a51a13d/attachment.html>


More information about the ntg-context mailing list