From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46806 Path: news.gmane.org!not-for-mail From: Duncan Hothersall Newsgroups: gmane.comp.tex.context Subject: MPgraphic with rounded corners Date: Thu, 15 Jan 2009 17:26:55 +0000 Message-ID: <496F71DF.5080605@capdm.com> 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 1232040566 30215 80.91.229.12 (15 Jan 2009 17:29:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 17:29:26 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 15 18:30:37 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LNW32-00058P-9p for gctc-ntg-context-518@m.gmane.org; Thu, 15 Jan 2009 18:30:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B70841FDCA; Thu, 15 Jan 2009 18:29:08 +0100 (CET) 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 16531-03; Thu, 15 Jan 2009 18:28:44 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C51BC1FB4E; Thu, 15 Jan 2009 18:28:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1CD6E1FB4E for ; Thu, 15 Jan 2009 18:28:42 +0100 (CET) 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 21324-01-3 for ; Thu, 15 Jan 2009 18:28:28 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id 6ABD01FA41 for ; Thu, 15 Jan 2009 18:28:27 +0100 (CET) Original-Received: from banoffee.capdm.com (banoffee.capdm.com [212.20.255.171]) by filter4-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0FHSMbl006837 for ; Thu, 15 Jan 2009 18:28:22 +0100 Original-Received: from [127.0.0.1] (lynx.capdm.com [212.20.255.162]) by banoffee.capdm.com (Postfix) with ESMTP id 112D43448132 for ; Thu, 15 Jan 2009 17:18:03 +0000 (GMT) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.20.255.171; country=GB; region=U8; city=Edinburgh; latitude=55.9500; longitude=-3.2000; http://maps.google.com/maps?q=55.9500,-3.2000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 166007500 - eb0b452e6673 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:46806 Archived-At: Hello all. I have adapted a bit of MP code from Aditya from a mailing list message dated 2006-05-19 (http://archive.contextgarden.net/message/20060519.214124.9174ac0e.en.html) to ensure that when a page break occurs in a textbackground there is a forced vertical space inside the box at the top of the new page. This code works fine for me (although interestingly not in the garden): \setupcolors[state=start] \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 8pt bottomenlarged 8pt; fill p withcolor 0.9white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground[ExampleBackground] [mp=mpos:par:myexample,location=paragraph,leftoffset=1em,rightoffset=1em,rulethickness=1pt] \starttext \input knuth \endgraf \starttextbackground[ExampleBackground] \dorecurse{13}{\input knuth \endgraf} \stoptextbackground \input knuth \endgraf \stoptext But now I need to make this box have rounded corners, and I am very confused when reading core-pgr.tex because that is a level of MP code I just don't understand. Would somebody please be able to tell me what to change in the above to make the corners of the box rounded (with a radius of 2mm)? Thank you very much! Duncan ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________