From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106404 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Problem with shading when using rotation (Metapost) Date: Sat, 29 Feb 2020 11:01:27 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6216586873003942515==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="27589"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 29 11:05:05 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7yzY-00073C-Kp for gctc-ntg-context-518@m.gmane-mx.org; Sat, 29 Feb 2020 11:05:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 521C2182523; Sat, 29 Feb 2020 11:04:32 +0100 (CET) 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 Ebt5r2P0MZb7; Sat, 29 Feb 2020 11:04:30 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5A0B1182527; Sat, 29 Feb 2020 11:04:30 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B92A2182523 for ; Sat, 29 Feb 2020 11:04:28 +0100 (CET) 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 t67zsjbaTCoL for ; Sat, 29 Feb 2020 11:04:28 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.48; helo=mail-wr1-f48.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1EE0A1824A4 for ; Sat, 29 Feb 2020 11:04:28 +0100 (CET) Original-Received: by mail-wr1-f48.google.com with SMTP id m16so6146989wrx.11 for ; Sat, 29 Feb 2020 02:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fkp7CvuiHmPDIirZU5yd7r0pwdtD5M9zYETeslItr2E=; b=Zc1aFRTcLyqOcc05CEWft4gcQYA0pzaSFzvlEKOhRdfIIeabME7VfLT+gRZgkxxbtS jNdqLsLf53eUeS57TMd/jKg3+PG3HAZNp8bldDTzU+LjrgNxP333q0hgUFtGBP5a1Tiv jICIIMU1wjCKDpslsN5cTLjQOvmPBjDnw4tpXfKdgVQNUWETRplA4n5pvVPHHuv+wg26 m7V2pbTlRXfDYgnZsKMt20+iBEfu8HNcmJbvQ/TqtoEFdZjXqJmRP7Gwc8VSJ1dsoHaT nSlBe1HVgF+GzU7Eb+tmJjJGEf0r4hZoaL46+ZLH/N4IywNoMbU/X2Y/j2gjW3sNtzp9 Hd4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fkp7CvuiHmPDIirZU5yd7r0pwdtD5M9zYETeslItr2E=; b=P0cR20DuY4MmdbmwHlGoNcmdKjQUDPw7Ox3mK8ilfPi+LRtKL5D0Qx+wLKeFb73pH9 nhE2SVvVyjcmPnNAubpMkI7ru5FfkJunB4zfDPjPOuru/NdsYHinfaDLR4xgFGPnVCBS MsGCpxdtecS+vBCENUpvWcSF1Uj9HY0KJGbZWH7bTQeP0OMnG6lnOWflJ+uCMfn32ulf ynCi70t9LZW1e1uY25rE5mpo8a8inIVgYiuExFR6pHMF2lxRnohFX0kQ/2nE5xh0yYm4 OmalLGUkx62GJxbF89ZTcwFegAElRzXgKmZPWBGaC7FjxVcj+Lk8d/esZ5/vj01lmb29 kkPA== X-Gm-Message-State: APjAAAXEWL9V7Uknp6IvK8KOFS7ALjLOXqU6w+dsHOC1SK/fYdTJl2q4 Yf7d0pGFYiRaS2IwSSYb8UMajrwWyjDv9xToLn4GbVQIyFM= X-Google-Smtp-Source: APXvYqzVyvk1yq/JwMUDWrrOLUnXagdZ76FBavJFFD4we4tf9AO02bcdJSYA6nkIeEKoGU8XB8D3E5WvZw/1qziwbHs= X-Received: by 2002:adf:de09:: with SMTP id b9mr9930204wrm.160.1582970667357; Sat, 29 Feb 2020 02:04:27 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:106404 Archived-At: --===============6216586873003942515== Content-Type: multipart/alternative; boundary="0000000000005159d7059fb414ba" --0000000000005159d7059fb414ba Content-Type: text/plain; charset="UTF-8" Hi, Sorry to come back with my match problem. In fact, I do not understand why a rotation of 90 influences the degraded color of the ends of the matches. Thank you. Fabrice \starttext \startMPcode def match (expr alpha, pos) = numeric l; l = 4.6cm; picture pic; pic = image ( fill unitsquare xscaled 4cm yscaled 0.2cm withcolor yellow ; fill origin -- (4cm,0) -- (4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle withcolor(.6yellow + black); draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle ; fill fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm) shaded withshademethod "circular" withshadefactor 0.75 withshadecolors (white,red);); draw (fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm)); draw pic rotated alpha shifted pos; enddef; picture house ; house = image ( match(90,(0,0)); match(0,(0,0)); match(90,(l,0)); match(120,(l,l)); match(60,(0,l));); draw house; \stopMPcode --0000000000005159d7059fb414ba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
So= rry to come back with my match problem. In fact, I do not understand why a rotation of 90 influences the degr= aded color of the ends of the matches.
Thank you= .
Fabrice

= \starttext
\startMPcode
=C2=A0
=C2=A0 def match = (expr alpha, pos) =3D
=C2=A0 =C2=A0 numeric l;
=C2=A0 =C2=A0 l =3D 4.= 6cm;
=C2=A0 =C2=A0 picture pic;
=C2=A0 =C2=A0 pic =3D image (
=C2= =A0 =C2=A0 fill unitsquare xscaled 4cm =C2=A0yscaled 0.2cm =C2=A0withcolor = yellow ;
=C2=A0 =C2=A0 fill origin -- (4cm,0) -- (4.1cm,-0.05cm) -- =C2= =A0(0.1cm,-0.05cm) --
=C2=A0 =C2=A0 cycle withcolor(.6yellow + black);=C2=A0 =C2=A0 draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1c= m,-0.05cm)
=C2=A0 =C2=A0 -- (0.1cm,-0.05cm) -- cycle ;
=C2=A0 =C2=A0 = fill fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm) shaded
= =C2=A0 =C2=A0 withshademethod "circular"
=C2=A0 =C2=A0 withsha= defactor 0.75
=C2=A0 =C2=A0 withshadecolors (white,red););
=C2=A0 =C2= =A0 draw (fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm));
= =C2=A0 =C2=A0 draw pic rotated alpha shifted pos;
=C2=A0 =C2=A0 enddef;<= br>
=C2=A0 =C2=A0 picture house ;
=C2=A0 =C2=A0 house =3D image (
= =C2=A0 =C2=A0 match(90,(0,0));
=C2=A0 =C2=A0 match(0,(0,0));
=C2=A0 = =C2=A0 match(90,(l,0));
=C2=A0 =C2=A0 match(120,(l,l));
=C2=A0 =C2=A0= match(60,(0,l)););

=C2=A0 =C2=A0 draw house;
=C2=A0 =C2=A0
\= stopMPcode
--0000000000005159d7059fb414ba-- --===============6216586873003942515== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6216586873003942515==--