From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52334 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Round-corner textbox with shadow Date: Sun, 16 Aug 2009 18:05:56 +0200 Message-ID: <4A882E64.3090509@wxs.nl> References: <00db01ca1da6$c8d10a80$5a731f80$@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 1250438775 28700 80.91.229.12 (16 Aug 2009 16:06:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 16:06:15 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 16 18:06:08 2009 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 1MciFD-0007jN-B4 for gctc-ntg-context-518@m.gmane.org; Sun, 16 Aug 2009 18:06:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A949C9AB7; Sun, 16 Aug 2009 18:06:02 +0200 (CEST) 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 NNn3Jdl+GgqP; Sun, 16 Aug 2009 18:05:58 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 974E3C9A8A; Sun, 16 Aug 2009 18:05:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 87C03C9A8A for ; Sun, 16 Aug 2009 18:05:57 +0200 (CEST) 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 enlRn5QTsGlh for ; Sun, 16 Aug 2009 18:05:55 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id A22C0C9A77 for ; Sun, 16 Aug 2009 18:05:55 +0200 (CEST) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 34489-1840426 for ; Sun, 16 Aug 2009 18:05:55 +0200 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: <00db01ca1da6$c8d10a80$5a731f80$@com> X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 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:52334 Archived-At: Tom wrote: > Shadows on round-corner textboxes are producing square-corner shaded boxes > with square-corner shadows. The following code illustrates the problem and > should run asis. > > \def\Demos{ > > \startuniqueMPgraphic{shadow} > fill OverlayBox shifted (4pt,-4pt) withcolor .8white ; > fill OverlayBox withcolor .8white ; > draw OverlayBox withcolor black ; > setbounds currentpicture to OverlayBox ; > \stopuniqueMPgraphic > \defineoverlay [shadow] [\uniqueMPgraphic{shadow}] > > \setupcolors[state=start] > \startframedtext[ > height=fit, > width=\textwidth, > location=inmargin , > align=low, > frame=on, > % framecolor=black, > framecorner=round, > frameradius=.0625 in, > background=shadow, %substitute screen for shadow and get clean box BUT no > shadow > backgroundscreen=0.9, > backgroundcorner=round, > backgroundradius=.0625 in, > bodyfont=9pt, > offset=0.05 in > ] > \setuptables[distance=small,bodyfont={9pt,sansserif}] > > \starttable[s1|Br|o4l|Br|l|] > \NC Name: \NC \getvariable{Book:Demos}{name} > \NC Nickname: \NC \getvariable{Book:Demos}{nickname} \NC\AR > \NC DOB: \NC \getvariable{Book:Demos}{dob} > \NC Height: \NC \getvariable{Book:Demos}{height} \NC\AR > \NC Weight: \NC \getvariable{Book:Demos}{weight} > \NC Age: \NC \getvariable{Book:Demos}{age} \NC\AR > \NC Tribe: \NC \getvariable{Book:Demos}{tribe} > \NC Home: \NC \getvariable{Book:Demos}{home} \NC\AR > \NC Parents: \NC \THREE \getvariable{Book:Demos}{parents} \NC\AR > \doifnot {\getvariable{Book:Demos}{parentsextra}}{}{\NC \NC \THREE > \getvariable{Book:Demos}{parentsextra} \NC\AR} > \stoptable > \starttable[s1|Br|l|] > \NC Early Schooling: \NC \getvariable{Book:Demos}{earlyschooling} \NC\AR > \doifnot {\getvariable{Book:Demos}{laterschooling}}{}{\NC Later Schooling: > \NC \getvariable{Book:Demos}{laterschooling} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors1}}{}{\NC Honors: \NC > \getvariable{Book:Demos}{honors1} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors2}}{}{\NC \NC > \getvariable{Book:Demos}{honors2} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors3}}{}{\NC \NC > \getvariable{Book:Demos}{honors3} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors4}}{}{\NC \NC > \getvariable{Book:Demos}{honors4} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors5}}{}{\NC \NC > \getvariable{Book:Demos}{honors5} \NC\AR} > \doifnot {\getvariable{Book:Demos}{honors6}}{}{\NC \NC > \getvariable{Book:Demos}{honors6} \NC\AR} > \stoptable > \stopframedtext > } > > \starttext > > \setvariables[Book:Demos] > [name={Glenn Scobey Warner}, > nickname={Pop, The Old Fox}, > dob={4/5/1871}, > height={6'0"}, > weight={205}, > age={}, > tribe={N/A}, > home={Springville, NY}, > parents={William H. Warner, Adaline Scobey}, > parentsextra={}, > earlyschooling={Griffith Instatute}, > laterschooling={Cornell University}, > honors1={College Football Hall of Fame, Charter Member, 1951}, > honors2={Helm's Athletic Foundation Hall of Fame, 1951}, > honors3={Stanford Athletic Hall of Fame}, > honors4={Greater Buffalo Hall of Fame, 2001}, > honors5={}, > honors6={} > ] > > \Demos > > \stoptext just use mp for both instead of expecting these two mechanism to know of each other ... \startuniqueMPgraphic{shadow} fill OverlayBox cornered .5 shifted (4pt,-4pt) withcolor .8white ; fill OverlayBox withcolor .9white ; setbounds currentpicture to OverlayBox ; \stopuniqueMPgraphic \defineoverlay [shadow] [\uniqueMPgraphic{shadow}] \setupcolors[state=start] \startframedtext[ height=fit, width=\textwidth, align=low, frame=off, background=shadow, bodyfont=9pt, offset=0.05in] ----------------------------------------------------------------- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________