From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20483 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: presentations in ConTeXt Date: Tue, 24 May 2005 20:56:28 +0200 Message-ID: <429378DC.407@seznam.cz> References: <9EA19B5C-0590-49C8-B397-0DDF02B0E53F@uni-bonn.de> <6faad9f005052410333139b7f2@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1116961112 26162 80.91.229.2 (24 May 2005 18:58:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 May 2005 18:58:32 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue May 24 20:58:20 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DaeaQ-00063q-F0 for gctc-ntg-context-518@m.gmane.org; Tue, 24 May 2005 20:57:06 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 01C99127C1; Tue, 24 May 2005 20:58:49 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30605-01; Tue, 24 May 2005 20:58:48 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8497912775; Tue, 24 May 2005 20:55:14 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 405A712775 for ; Tue, 24 May 2005 20:55:13 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30376-03 for ; Tue, 24 May 2005 20:55:12 +0200 (CEST) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id 165211276B for ; Tue, 24 May 2005 20:55:11 +0200 (CEST) Original-Received: (qmail 988 invoked from network); 24 May 2005 18:55:10 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@62.240.166.134) by smtp.seznam.cz with SMTP; 24 May 2005 18:55:10 -0000 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: Mojca Miklavec , mailing list for ConTeXt users In-Reply-To: <6faad9f005052410333139b7f2@mail.gmail.com> X-Antivirus: avast! (VPS 0521-0, 23.05.2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20483 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20483 Mojca Miklavec wrote: > On 5/23/05, Thomas A. Schmitz wrote: > > >>I am still at a loss how to achieve one thing in ConTeXt that was >>pretty easy in Keynote or (shudder) Powerpoint: When I wanted to >>highlight something on a map or a picture, I would just draw a red >>circle around it. What would be the proper way to do this in ConTeXt? >>Adding a layer with a red circle drawn in Metapost, then positioning >>it by trial and error? Or can anyone point to a better solution? > > > What kind of picture do you have? If you have .jpg/.png/..., you can > get (x,y) position of the pixel where the center of circle should be. > > One possibility is to create a new metapost figure and draw the circle > on it using the measured coordinates: > > (This circles the blue tulip on > http://contextgarden.net/images/6/65/Kochloewe_c.jpg.) > > \setupcolors[state=start] > \starttext > \startuseMPgraphic{CircleBlueTulip} > % center point > pair size, c; > % figure will be 10 cm wide > scale := 10cm/400; > > % center of the blue tulip is on (219,333), image is 400*460 > size := (400,460) scaled scale; > c := (222,460-330) scaled scale; > % diameter of the circle should be 50 pixels > d := 50scale; > > pickup pencircle scaled 2pt; > > externalfigure "Kochloewe_c.jpg" xyscaled size; > draw fullcircle scaled d shifted c withcolor red; > \stopuseMPgraphic > > \useMPgraphic{CircleBlueTulip} > > \stoptext > > I believe there exists a more straightforward way if you make > uniqueMPgraphic and specify coordinate fractions of the circle to be > drawn, but if you say: > > \framed[background=SomeGraphicWithACircle]{\externalfigure[Kochloewe_c][width=10cm]}, > the circle (if any) is drawn behind the figure and cannot be used as > such. Unless you specify the figure in a new layer and draw both > layers in the proper order. > > In this case it would be fine to have a \framed[...foreground=...] command :) Use \framed [background={foreground,BgFront}] {\externalfigure[Kochloewe_c][width=10cm]}} Define your picture as BgFront. 'foreground' is fixed word that identifies layer 0 (text). So you can stack bacground as follow: background={...,MyLayer-2,MyLayer-1,foreground,MyLayer1,MyLayer2,...} Vit