From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55511 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Using frames with metapost background in metapost Date: Mon, 11 Jan 2010 12:39:16 +0100 Message-ID: <4B4B0DE4.8030408@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1263209991 4144 80.91.229.12 (11 Jan 2010 11:39:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2010 11:39:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 11 12:39:44 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NUIca-0001uc-Bz for gctc-ntg-context-518@m.gmane.org; Mon, 11 Jan 2010 12:39:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55DBCC9B66; Mon, 11 Jan 2010 12:39:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p3zu-YtHF0b7; Mon, 11 Jan 2010 12:39:33 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 28CC5C9B1A; Mon, 11 Jan 2010 12:39:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 54827C9B1A for ; Mon, 11 Jan 2010 12:39:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9MDQScQ1sEtK for ; Mon, 11 Jan 2010 12:39:29 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id 68C3FC9B03 for ; Mon, 11 Jan 2010 12:39:29 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-9 (SurgeMail 4.2d2) with ESMTP id 946-1713362 for multiple; Mon, 11 Jan 2010 12:39:10 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:55511 Archived-At: On 11-1-2010 3:07, Aditya Mahajan wrote: > \startmode[error] > \defineoverlay[MP:background] > [\useMPgraphic{MP:backgound}] > > \startuseMPgraphic{MP:backgound} > draw OverlayBox randomized 9pt withcolor blue; > \stopuseMPgraphic > \stopmode > > \defineframed[boxframed][frame=on,background=MP:background] > > % A frame defined with \defineframe does not work > % inside Metapost, so I prevent expansion. > > \unexpanded\def\boxed#1{\boxframed{#1}} ok, i'll make 'm unexpandable in the core > \starttext > > \boxed{Boxed in text} > > \startMPcode > draw textext("\boxed{boxed in metapost}") ; > %draw textext("\boxframed{boxed in metapost}") ; > \stopMPcode > > \stoptext \starttext \startMPcode picture p ; p := textext("boxed in metapost") ; draw p ; draw (boundingbox p) randomized 9pt withcolor blue; \stopMPcode \stoptext for more complex cases use image as in picture p ; p := image ( draw this; drae that; ) ; ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 ___________________________________________________________________________________