From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59951 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: blurred shadow on images? Date: Thu, 1 Jul 2010 10:58:16 +0200 Message-ID: <8F7F9630-3588-4349-95D3-3095D4E01E39@fiee.net> References: <4C1F09F1.6030404@elvenkind.com> <2AB09333-C25D-4034-865C-B5A4557B6193@fiee.net> <4C2BAD7E.9090004@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1277974712 10089 80.91.229.12 (1 Jul 2010 08:58:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 08:58:32 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 01 10:58:27 2010 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.69) (envelope-from ) id 1OUFbG-0007br-Nj for gctc-ntg-context-518@m.gmane.org; Thu, 01 Jul 2010 10:58:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0307DC9B4F; Thu, 1 Jul 2010 10:58:26 +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 5M1-TQn6AVaE; Thu, 1 Jul 2010 10:58:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D7A40C9B16; Thu, 1 Jul 2010 10:58:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D05A2C9B16 for ; Thu, 1 Jul 2010 10:58:20 +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 0rqsuqrmvb+J for ; Thu, 1 Jul 2010 10:58:18 +0200 (CEST) Original-Received: from turan.fiee.net (turan.fiee.net [87.230.77.106]) by balder.ntg.nl (Postfix) with ESMTP id 7111CC9B0D for ; Thu, 1 Jul 2010 10:58:18 +0200 (CEST) X-No-Auth: unauthenticated sender Original-Received: from turan.fiee.net (lvps87-230-77-106.dedicated.hosteurope.de [127.0.0.1]) by turan.fiee.net (Postfix) with ESMTP id 620F317BC02A0 for ; Thu, 1 Jul 2010 10:58:17 +0200 (CEST) Original-Received: from [10.128.9.9] (189-120.76-83.cust.bluewin.ch [83.76.120.189]) by turan.fiee.net (Postfix) with ESMTP for ; Thu, 1 Jul 2010 10:58:17 +0200 (CEST) In-Reply-To: <4C2BAD7E.9090004@googlemail.com> X-Mailer: Apple Mail (2.936) 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:59951 Archived-At: Am 2010-06-30 um 22:47 schrieb Wolfgang Schuster: > You can change the boundingbox in the metapost graphic (the white > background was required > for the cow figure because it has a transparent background) Thank you! I used an opaque picture for my tests. I played a bit with different shapes, I like my rounded rectangle best: \startuniqueMPgraphic{mpshadow} ox := -7 ; % offset x oy := -7 ; % offset y bx := 5 ; % bleed x by := 5 ; % bleed y rx := 7 ; % corner radius x ry := 7 ; % corner radius y for dx = 0 upto 40: dy := dx ; xa := dx + ox - bx/2; xb := \overlaywidth - dx + ox + bx/2; ya := dy + oy - by/2; yb := \overlayheight - dy + oy + by/2; % % rectangle % fill (xa,ya)--(xb,ya)--(xb,yb)--(xa,yb)--cycle % withcolor transparent("normal", .04, black) ; % rounded rectangle fill (xa, ya + ry)--- (xa, yb - ry).. (xa + rx, yb)--- (xb - rx, yb).. (xb, yb - ry)--- (xb, ya + ry).. (xb - rx, ya)--- (xa + rx, ya)..cycle withcolor transparent("normal", .04, black) ; % % super ellipse % hx := xb / 2; % hy := yb / 2; % fill (xa + rx, ya + ry)... % (xa, ya + hy)... % (xa + rx, yb - ry)... % (xa + hx, yb)... % (xb - rx, yb - ry)... % (xb, ya + hy)... % (xb - rx, ya + ry)... % (xa + hx, ya)...cycle % withcolor transparent("normal", .04, black) ; endfor; setbounds currentpicture to OverlayBox ; \stopuniqueMPgraphic \defineoverlay[shadow][\useMPgraphic{mpshadow}] \starttext \rotate[rotation=12]{% \externalfigure[koe][width=50mm,background=shadow] } \stoptext Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________