From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94282 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Square pens and dash pattern Date: Wed, 6 Apr 2016 10:01:31 +0200 Message-ID: References: <5704C05A.7030401@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3077263595518680313==" X-Trace: ger.gmane.org 1459929849 389 80.91.229.3 (6 Apr 2016 08:04:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2016 08:04:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 06 10:03:57 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aniRQ-0007vF-CI for gctc-ntg-context-518@m.gmane.org; Wed, 06 Apr 2016 10:03:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E19D09FFD; Wed, 6 Apr 2016 10:01:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i_KKUmIE1C35; Wed, 6 Apr 2016 10:01:46 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 3F66F9FFF; Wed, 6 Apr 2016 10:01:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2E8319FFC for ; Wed, 6 Apr 2016 10:01:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p1eyPgTt56eq for ; Wed, 6 Apr 2016 10:01:43 +0200 (CEST) Original-Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 42AEB9FFB for ; Wed, 6 Apr 2016 10:01:32 +0200 (CEST) Original-Received: by mail-lb0-f175.google.com with SMTP id u8so24655024lbk.0 for ; Wed, 06 Apr 2016 01:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=qhlVwPxSaVIti7iTHWlHs0563PMpkhiHt5QYnnb/xSE=; b=01ftjJr7nThvbzb7Xt0SV2gMORUt0wzy2No0EPQgJTnMpW6teCFhxPzSVSfN2EHtoE EjFhPtzF24qULxg4NJajmP+snsZd1tUmtj6HpFp4VHgeYvv4H7E/FhJGdlmLBxPZOzWe wB/7igh05YsNz7ashADvDLxPwMTtHdFl6IuzeNj4JwdBKQPbagq8Uz82fpmKT//3XOda EE52qf5G5N4xqFqnRqYhwIPPhoKvEXDs1xLHWZWovAktb03YnEYTtj66mTj/oWBheOjD KyNnx/zN+p4Ad/DQJv9WiRxt9va8QtLaw/oFT6PoMDeCRPtxnUe4S6lZaf2wBgfLlFGK Sarg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=qhlVwPxSaVIti7iTHWlHs0563PMpkhiHt5QYnnb/xSE=; b=l3RBeCiNpSpPsUTIzUj7CtYeftO9AskE37YmGi2Qimx+8q1GBcTipSHxkEsxcOY+YS TmV1/5SGcqxkDPcp111Lrn//3r+I1NmhnwZ66BKA23sSHX9XxhYWTXkx7V2+rC7DTQPA xKOEayAHM7+2VNRIUSpAC1Cvpk7vWHzylbt2dFZdR81uKvLBdf3NK39UnMWMR/e7XsfU rF9Bm33tP/AtuJRhe3UzCerLzvwtLEvyHwGVUjkzgg1CiyOXUn2tyEr7zSkDcUeozupl ajBWUCr2MUzscsCsSRkplkcpcKeBTXrs8Qvwlr2Jnjbv9gNF+oelUnExvt8R1Xl8yJQI d/EA== X-Gm-Message-State: AD7BkJIDwJ9wr/RbmKEcRQvisHr9pesTpjSZfSjUmlOVRFQ9wwlj6MAw/tKJR1fBNQA0byECkyaVBSv6u7+G8g== X-Received: by 10.112.171.33 with SMTP id ar1mr9979764lbc.54.1459929691137; Wed, 06 Apr 2016 01:01:31 -0700 (PDT) Original-Received: by 10.25.86.85 with HTTP; Wed, 6 Apr 2016 01:01:31 -0700 (PDT) In-Reply-To: <5704C05A.7030401@wxs.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:94282 Archived-At: --===============3077263595518680313== Content-Type: multipart/alternative; boundary=001a11c383eca32bfe052fcc5e4c --001a11c383eca32bfe052fcc5e4c Content-Type: text/plain; charset=UTF-8 On Wed, Apr 6, 2016 at 9:52 AM, Hans Hagen wrote: > On 4/6/2016 1:44 AM, Aditya Mahajan wrote: > >> Hi, >> >> There appears to be a metapost bug with square pens and dash patterns: >> >> \starttext >> >> \startMPcode >> pickup pencircle scaled 1bp; >> drawarrow origin -- (5cm, 4cm) dashed evenly; >> pickup pensquare scaled 1bp; >> drawarrow origin -- (5cm,-4cm) dashed evenly; >> \stopMPcode >> >> \stoptext >> >> Note that the second arrow is not dashed at all! This is not due to the >> thick pen. >> > > pencircles make simple round pens that are mapped directly onto ps > primitives and there dashing applies (dashing is just passing data to the > backend) ... afaik other penshapes can result in a filled path so no > dashing applies > > (but mp master luigi will tripple check it in the source for you so he > might come up with another answer) > > (and after that, as mathematical challenge, alan will write a mp macro > that fakes the dashing) > > Hans > > # cat test-square.mp test-circle.mp beginfig(1); tracingall; %pickup pencircle scaled 1bp; %drawarrow origin -- (5cm, 4cm) dashed evenly; pickup pensquare scaled 1bp; drawarrow origin -- (5cm,-4cm) dashed evenly; endfig; end. beginfig(1); tracingall; pickup pencircle scaled 1bp; drawarrow origin -- (5cm, 4cm) dashed evenly; %pickup pensquare scaled 1bp; %drawarrow origin -- (5cm,-4cm) dashed evenly; endfig; end. # mpost test-square.mp says, near the end, Edge structure at line 7 (just shipped out): Filled pen stroke : (0,0)..controls (47.24408,-37.79527) and (94.48817,-75.59053) ..(141.73225,-113.3858) dashed (on 3 off 3) shifted 0 (this will be ignored) while # mpost test-circle.mp says Edge structure at line 7 (just shipped out): Filled pen stroke : (0,0)..controls (47.24408,37.79527) and (94.48817,75.59053) ..(141.73225,113.3858) dashed (on 3 off 3) shifted 0 So it doesn't look a mpost bug . -- luigi --001a11c383eca32bfe052fcc5e4c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Apr 6, 2016 at 9:52 AM, Hans Hagen <pragma@wxs.nl> w= rote:
On 4/6/2016 1:44 AM, Aditya Maha= jan wrote:
Hi,

There appears to be a metapost bug with square pens and dash patterns:

\starttext

\startMPcode
=C2=A0 =C2=A0 =C2=A0pickup pencircle scaled 1bp;
=C2=A0 =C2=A0 =C2=A0drawarrow origin -- (5cm, 4cm) dashed evenly;
=C2=A0 =C2=A0 =C2=A0pickup pensquare scaled 1bp;
=C2=A0 =C2=A0 =C2=A0drawarrow origin -- (5cm,-4cm) dashed evenly;
\stopMPcode

\stoptext

Note that the second arrow is not dashed at all! This is not due to the
thick pen.

pencircles make simple round pens that are mapped directly onto ps primitiv= es and there dashing applies (dashing is just passing data to the backend) = ... afaik other penshapes can result in a filled path so no dashing applies=

(but mp master luigi will tripple check it in the source for you so he migh= t come up with another answer)

(and after that, as mathematical challenge, alan will write a mp macro that= fakes the dashing)

Hans




beginfig(1);
tracingall;
= %pickup pencircle scaled 1bp;
%drawarrow origin -- (5cm, 4cm) das= hed evenly;
pickup pensquare scaled 1bp;
drawarrow orig= in -- (5cm,-4cm) dashed evenly;
endfig;
end.
=


beginfig(1);
tracing= all;
pickup pencircle scaled 1bp;
drawarrow origin -- (= 5cm, 4cm) dashed evenly;
%pickup pensquare scaled 1bp;
= %drawarrow origin -- (5cm,-4cm) dashed evenly;
endfig;
= end.

=C2=A0# mpost=C2=A0test-square.mp=C2=A0
says, near the end,


Edge structure at line 7 (just ship= ped out):
Filled pen stroke :
(0,0)..controls (47.24408,-37.79527) and (94.48817,-75.5= 9053)
=C2=A0..(141.73225,-113.3858)
dashed (on 3 off 3) shifted 0 (this will be ignore= d)


while
# mpost=C2=A0test-circle.mp=C2=A0
says=C2=A0
=

Edge structure at line 7 (just shipped out):
=
Filled pen stroke :
(0,0)..controls (47.24408,37.79527) and = (94.48817,75.59053)
=C2=A0..(141.73225,113.3858)
dashed= (on 3 off 3) shifted 0

So it doesn't lo= ok =C2=A0a mpost bug .

--
luigi
--001a11c383eca32bfe052fcc5e4c-- --===============3077263595518680313== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============3077263595518680313==--