ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Rotating an image
Date: Thu, 15 Oct 2015 17:27:58 +0200	[thread overview]
Message-ID: <561FC5FE.7070806@gmail.com> (raw)
In-Reply-To: <CACyK-er3qi4En=x4eMP6qka4_0xVCsMXmtZ0o1zgW7xJ=odyCw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1532 bytes --]

> Fabrice Couvreur <mailto:fabrice1.couvreur@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

[-- Attachment #1.2: Type: text/html, Size: 3313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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	other threads:[~2015-10-15 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 18:58 Fabrice Couvreur
2015-10-15 15:27 ` Wolfgang Schuster [this message]
2015-10-15 16:36   ` Fabrice Couvreur
2015-10-15 17:32     ` Alan BRASLAU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561FC5FE.7070806@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).