From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11891 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re[3]: Backgrounds Date: Fri, 11 Apr 2003 15:35:38 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <17920267132.20030411153538@iol.it> References: <871y0biuyd.fsf@gundla.ch> <5.1.0.14.1.20030325094633.031a8c80@server-1> <5.1.0.14.1.20030325094633.031a8c80@server-1> <5.1.0.14.1.20030325131938.01d9af40@server-1> <9619582618.20030325153623@iol.it> <871y0biuyd.fsf@gundla.ch> <5.2.0.9.1.20030410215807.014f3880@localhost> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1050068804 22007 80.91.224.249 (11 Apr 2003 13:46:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 11 Apr 2003 13:46:44 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Fri Apr 11 15:46:43 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 193yr1-0005fc-00 for ; Fri, 11 Apr 2003 15:46:07 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id B7C1E10AFF; Fri, 11 Apr 2003 15:46:39 +0200 (MEST) Original-Received: from smtp3.libero.it (smtp3.libero.it [193.70.192.127]) by ref.ntg.nl (Postfix) with ESMTP id 2225C10AEC for ; Fri, 11 Apr 2003 15:43:36 +0200 (MEST) Original-Received: from OBLOMOV (151.29.141.181) by smtp3.libero.it (6.7.015) id 3E44E967017B84D1 for ntg-context@ntg.nl; Fri, 11 Apr 2003 15:43:35 +0200 X-Mailer: The Bat! (v1.63 Beta/7) X-Priority: 3 (Normal) Original-To: ntg-context@ntg.nl In-Reply-To: <5.2.0.9.1.20030410215807.014f3880@localhost> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11891 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11891 Thursday, April 10, 2003 Hans Hagen wrote: HH> \startuseMPgraphic{mpos:par:columnset} HH> path q ; picture r ; color framecolor, backgroundcolor ; HH> cornerradius := 5pt ; offset := 7.5pt ; HH> framecolor := red ; framethickness := 2pt ; HH> backgroundcolor := lightgray ; HH> for i := 1 upto nofmultipars : HH> multipars[i] := multipars[i] enlarged offset ; HH> if multilocs[i] = 1 : % top HH> q := multipars[i] bottomenlarged (4cornerradius) ; HH> elseif multilocs[i] = 2 : HH> q := multipars[i] bottomenlarged (4cornerradius) ; HH> q := q topenlarged (4cornerradius) ; HH> else: HH> q := multipars[i] topenlarged (4cornerradius) ; HH> fi ; HH> q := q smoothed (2cornerradius) ; HH> r := image HH> ( fill q withcolor backgroundcolor ; HH> draw q withcolor framecolor HH> withpen pencircle scaled framethickness ; ) ; HH> clip r to boundingbox multipars[i] ; HH> addto currentpicture also r ; HH> endfor ; HH> \stopuseMPgraphic HH> watch the usage of "enlarged" and the "smoothed" I think I see; instead of drawing only the needed parts you draw the whole frame and then cut the unwanted parts off. Is this more efficient than drawing only the needed parts? And what about the way to determine when there is a split or not? Could you please put a boolean that reveals it, in the next beta? (even if I'm still convinced that using a multilocs of 0 would be enough ... ok, it would break backwards compatibility, but how many people are using this mechanism already?) -- Giuseppe "Oblomov" Bilotta