From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10151 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: shadowed frame in ConTeXt Date: Tue, 17 Dec 2002 10:16:39 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20021217100038.0342f1b0@server-1> References: <5.1.0.14.1.20021212095911.03012008@server-1> <5.1.0.14.1.20021216100113.02c7ac20@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1040118693 11972 80.91.224.249 (17 Dec 2002 09:51:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 17 Dec 2002 09:51:33 +0000 (UTC) Cc: ntg-context@ntg.nl 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 18OENw-00036x-00 for ; Tue, 17 Dec 2002 10:51:32 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id CFE0610AF9; Tue, 17 Dec 2002 10:51:57 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 5B5A810AF2 for ; Tue, 17 Dec 2002 10:48:09 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id gBH9keNx027575; Tue, 17 Dec 2002 10:46:42 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.2/8.12.2) with ESMTP id gBH9kfgo003445; Tue, 17 Dec 2002 10:46:42 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: "hongfeng" In-Reply-To: <005b01c2a59f$05918080$e000a8c0@capital.com> X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) 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:10151 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10151 At 03:36 PM 12/17/2002 +0800, you wrote: >Is there any options to set shadowed frame (like the \usepackage{shadow} in > >(the \shadowbox in latex sets the shadow under the bottom and to right side >of the frame, sometimes we need to set the shadow in another place, >for example, right side and under the bottom, or over the top and right >side.) Take your choice \starttext \startbuffer \framed[background=shadow,frame=off]{Does it work} \vskip1cm \framed[background=shadow,frame=off,align=right]{Does\\it\\work} \vskip1cm \stopbuffer \defineoverlay[shadow][\uniqueMPgraphic{shadow}] \startuniqueMPgraphic{xshadow} linejoin := butt ; fill OverlayBox shifted (2pt,-2pt) withpen pencircle scaled 2pt withcolor .7white ; fill OverlayBox withcolor white ; draw OverlayBox withpen pencircle scaled 2pt withcolor .3white ; setbounds currentpicture to OverlayBox enlarged 4pt ; \stopuniqueMPgraphic \getbuffer \startuniqueMPgraphic{xshadow} linejoin := butt ; draw (urcorner OverlayBox -- lrcorner OverlayBox -- llcorner Overlaybox) shifted (2pt,-2pt) withpen pencircle scaled 2pt withcolor .9white ; draw OverlayBox withpen pencircle scaled 2pt withcolor .3white ; setbounds currentpicture to OverlayBox enlarged 4pt ; \stopuniqueMPgraphic \getbuffer \startuniqueMPgraphic{shadow} linejoin := butt ; linecap := squared ; draw (bottomboundary OverlayBox & rightboundary OverlayBox) shifted (2pt,-2pt) withpen pencircle scaled 2pt withcolor .9white ; draw OverlayBox withpen pencircle scaled 2pt withcolor .3white ; setbounds currentpicture to OverlayBox enlarged 4pt ; \stopuniqueMPgraphic \getbuffer \stoptext ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------