From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75953 Path: news.gmane.org!not-for-mail From: "Rogers, Michael K" Newsgroups: gmane.comp.tex.context Subject: Re: drawarrow and transparency Date: Thu, 3 May 2012 12:47:04 +0000 Message-ID: <40639B65-FA13-4553-8F94-C66CC69EF964@emory.edu> References: <20120502173518.604e1545@sole.extra.cea.fr> <20120502214224.754fa3ab@Zewz> <20120503123247.7592251f@sole.extra.cea.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1204661528==" X-Trace: dough.gmane.org 1336049241 4334 80.91.229.3 (3 May 2012 12:47:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 May 2012 12:47:21 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 03 14:47:19 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SPvRG-00013R-LS for gctc-ntg-context-518@m.gmane.org; Thu, 03 May 2012 14:47:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 33A57101E9; Thu, 3 May 2012 14:47:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0Vs4nfmXFVfF; Thu, 3 May 2012 14:47:13 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C15BB101E1; Thu, 3 May 2012 14:47:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 14E01101E1 for ; Thu, 3 May 2012 14:47:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pPK2aUl60g+w for ; Thu, 3 May 2012 14:47:10 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id B9F67101CF for ; Thu, 3 May 2012 14:47:10 +0200 (CEST) Original-Received: from ndb-mr2.cc.emory.edu (ndb-mr2.cc.emory.edu [170.140.52.250]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q43Cl0Pp029675 for ; Thu, 3 May 2012 14:47:01 +0200 Original-Received: from e14edge1n.Emory.Edu (emoryfloatdmz.cc.emory.edu [170.140.52.254]) by ndb-mr2.cc.emory.edu (8.13.8/8.13.1) with ESMTP id q43Cl6lB021987 for ; Thu, 3 May 2012 08:47:06 -0400 Original-Received: from E14CH4W.Enterprise.emory.net (10.240.10.116) by e14edge1n.Emory.Edu (170.140.52.18) with Microsoft SMTP Server (TLS) id 14.2.283.3; Thu, 3 May 2012 08:47:05 -0400 Original-Received: from E14MBX20N.Enterprise.emory.net ([fe80::e9ea:8c9d:f94e:7cd3]) by e14ch4w.Enterprise.emory.net ([::1]) with mapi id 14.02.0283.003; Thu, 3 May 2012 08:47:05 -0400 Thread-Topic: [NTG-context] drawarrow and transparency Thread-Index: AQHNKHk2QSgK/Hx0xEuuBtrbykA6m5a25o5+gAE7t4CAACWFAA== In-Reply-To: <20120503123247.7592251f@sole.extra.cea.fr> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [170.140.30.131] X-Emory-MailScanner-Information: Please contact the ISP for more information X-Emory-MailScanner-ID: q43Cl6lB021987 X-Emory-MailScanner: Found to be clean X-Emory-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.009, required 8, autolearn=disabled, HTML_MESSAGE 0.00, T_RP_MATCHES_RCVD -0.01) X-Emory-MailScanner-From: mroge02@emory.edu X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=170.140.52.250; country=CA; region=ON; city=London; postalcode=n6a4p9; latitude=42.9833; longitude=-81.2500; http://maps.google.com/maps?q=42.9833,-81.2500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WH5oL1uE - 3638ef1c3af0 - 20120503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:75953 Archived-At: --===============1204661528== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_40639B65FA1345538F94C66CC69EF964emoryedu_" --_000_40639B65FA1345538F94C66CC69EF964emoryedu_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On May 3, 2012, at 6:32 AM, Alan BRASLAU wrote: I believe that this is somewhat a bug with transparency under MetaFun. For I tried the following: \startMPcode picture pic ; pic :=3D image(drawarrow origin--(1cm,0)) ; draw pic withtransparency(1,.5) ; draw pic rotated 90 withtransparency(1,.5) ; \stopMPcode Here, the arrowhead is totally opaque and only the "stem" has transparency. Something is fishy. Alan I noticed the same thing. I think original problem is with how an arrow is= converted to PDF/Postscript drawing commands and how the color is computed= when commands are combined. The only solution I can imagine is to define = a new arrow macro that constructs the boundary path of the arrow and fills = it (i.e., up one side of the stem, around the arrowhead, and down the other= side of the stem). As far as I can tell, MetaPost/Postscript does not hav= e commands that compute the boundary path of the region painted by a sequen= ce of commands. (I think that computing the boundary might be a much harde= r problem in general than computing which points to paint. A straight arro= w would be fairly simple.) Michael ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). --_000_40639B65FA1345538F94C66CC69EF964emoryedu_ Content-Type: text/html; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable
On May 3, 2012, at 6:32 AM, Alan BRASLAU wrote:

I believe that this is somewhat a bug with transparency under MetaFun.
For I tried the following:

\startMPcode
picture pic= ; pic :=3D image(drawarrow origin--(1cm,0)) ;

draw pic wi= thtransparency(1,.5) ;
draw pic ro= tated 90 withtransparency(1,.5) ;
\stopMPcode

Here, the arrowhead is totally opaque and only the "stem"
has transparency. Something is fishy.

Alan

I noticed the same thing.  I think original problem is with how a= n arrow is converted to PDF/Postscript drawing commands and how the color i= s computed when commands are combined.  The only solution I can imagin= e is to define a new arrow macro that constructs the boundary path of the arrow and fills it (i.e., up one side of the stem= , around the arrowhead, and down the other side of the stem).  As far = as I can tell, MetaPost/Postscript does not have commands that compute the = boundary path of the region painted by a sequence of commands.  (I think that computing the boundary might b= e a much harder problem in general than computing which points to paint. &n= bsp;A straight arrow would be fairly simple.)

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
--_000_40639B65FA1345538F94C66CC69EF964emoryedu_-- --===============1204661528== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1204661528==--