From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46812 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: MPgraphic with rounded corners Date: Thu, 15 Jan 2009 18:48:52 +0100 Message-ID: <62B438E2-7B48-49CE-920C-E6AAA3FC3F55@gmail.com> References: <496F71DF.5080605@capdm.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232045244 15925 80.91.229.12 (15 Jan 2009 18:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 18:47:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 15 19:48:36 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 1LNXGb-0005UV-Ip for gctc-ntg-context-518@m.gmane.org; Thu, 15 Jan 2009 19:48:33 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 22CF81FD9B; Thu, 15 Jan 2009 19:47:15 +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 01245-05; Thu, 15 Jan 2009 19:46:08 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A55191FDCD; Thu, 15 Jan 2009 19:46:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 463731FDCC for ; Thu, 15 Jan 2009 19:46:05 +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 32204-03-2 for ; Thu, 15 Jan 2009 19:45:23 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id 3018A1FDCD for ; Thu, 15 Jan 2009 18:49:37 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0FHnanF002730 for ; Thu, 15 Jan 2009 18:49:36 +0100 Original-Received: by fg-out-1718.google.com with SMTP id 19so612382fgg.8 for ; Thu, 15 Jan 2009 09:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=y6XKP9+ZL0QN8Ef+QsGEQ+Lsbi9hqz0ZA+Bzu7CX/fI=; b=xW4Gdtu9j86I3cgX8/yKzbuv60wxf4ENxlbCv57AOIfz5BrQk70lr7JFfUJjQsgPWZ JjMCvScMD1WOjYF1J2NaI8eJbCpnHEkNhkSP/ry+VnZfY/SETzf7EJ2EHnGJByG8lT3c Dcjkc/ZgqbzVTPYr7016tSutd3XF7wFGyHYY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=JCEvUxMSYw8NFJNyEyDqSI8dvVPdxRuhNsww/gdxg/OaPWi40PHbZcGYRPde046GXK jVNI8LrA3h4BEi1Qdw0s5aCcjEf1zetoHv6GSut9mLfFgRcv/WGcQvNIaUmI58cTrf6k 9PxaiFm6O7UV30OGB1wis1UUFCwclkmkL6kTs= Original-Received: by 10.86.95.20 with SMTP id s20mr1507744fgb.39.1232041776246; Thu, 15 Jan 2009 09:49:36 -0800 (PST) Original-Received: from ?10.70.8.7? (8.106.113.82.net.de.o2.com [82.113.106.8]) by mx.google.com with ESMTPS id 3sm429932fge.47.2009.01.15.09.49.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Jan 2009 09:49:35 -0800 (PST) In-Reply-To: <496F71DF.5080605@capdm.com> X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.14.220.153; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 166016578 - 9c850b25541f X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:46812 Archived-At: Am 15.01.2009 um 18:26 schrieb Duncan Hothersall: > 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; p := multipars[1] topenlarged 8pt bottomenlarged 8pt smoothed 2mm ; > 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)? The smoothed function is explained in the MetaFun manual. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________