ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <gip.bilotta@iol.it>
Subject: Re[3]: Backgrounds
Date: Fri, 11 Apr 2003 15:35:38 +0200	[thread overview]
Message-ID: <17920267132.20030411153538@iol.it> (raw)
In-Reply-To: <5.2.0.9.1.20030410215807.014f3880@localhost>

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

  reply	other threads:[~2003-04-11 13:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-25  8:46 Re[2]: Backgrounds Hans Hagen
2003-03-25 10:43 ` Re[3]: Backgrounds Giuseppe Bilotta
2003-03-25 12:25   ` Hans Hagen
2003-03-25 14:36     ` Re[4]: Backgrounds Giuseppe Bilotta
2003-03-25 15:18       ` Hans Hagen
2003-03-25 17:00         ` Re[5]: Backgrounds Giuseppe Bilotta
2003-04-09 14:52       ` Backgrounds Patrick Gundlach
2003-04-09 16:57         ` Re[2]: Backgrounds Giuseppe Bilotta
2003-04-10  9:50           ` Backgrounds Patrick Gundlach
2003-04-10 11:43             ` Re[2]: Backgrounds Giuseppe Bilotta
2003-04-18 14:33             ` Backgrounds Johannes Hüsing
2003-04-18 14:36               ` Re[2]: Backgrounds Giuseppe Bilotta
2003-04-19 13:35               ` Backgrounds Patrick Gundlach
2003-04-10 20:00           ` Re[2]: Backgrounds Hans Hagen
2003-04-11 13:35             ` Giuseppe Bilotta [this message]
2003-04-11 16:02               ` Re[3]: Backgrounds Hans Hagen
2003-04-11 16:21                 ` Backgrounds Patrick Gundlach
2003-04-11 17:15                 ` Re[4]: Backgrounds Giuseppe Bilotta
2003-04-11 17:40                 ` Re[3]: Backgrounds John Culleton
2003-04-13 23:06                 ` supp-emp.tex \EMlinewd Hartmut Henkel
2003-04-14  6:48                   ` Hans Hagen
2003-04-18 14:41                 ` Re[4]: Backgrounds Giuseppe Bilotta
2003-04-19 10:42                   ` Hans Hagen
2003-04-19 12:10                     ` Re[5]: Backgrounds Giuseppe Bilotta
2003-04-21 11:13                       ` Hans Hagen
2003-04-21 18:33                         ` Re[6]: Backgrounds Giuseppe Bilotta
2003-03-25 18:00   ` Error: /undefined in NP scarso luigi
2003-03-26 12:55     ` scarso luigi
2003-03-26 14:04       ` Jens-Uwe Morawski
2003-03-28  7:41         ` scarso luigi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17920267132.20030411153538@iol.it \
    --to=gip.bilotta@iol.it \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).