Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-15 Thread Hans Hagen
On 2/15/2020 12:25 PM, Fabrice Couvreur wrote: Hi Henri, Why does the blue path not rotate 90 with the draw command but rotate with the fill command? compare draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm) -- (0.1cm,-0.05cm) -- cycle rotated alpha withcolor red;

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-15 Thread Floris van Manen
On 15-02-2020 12:25, Fabrice Couvreur wrote: > Hi Henri, > Why does the blue path not rotate 90 with the draw command but rotate > with the fill command? > Why not draw the match as a picture first, then rotate and shift that picture? Also, if you use a local scale unit, it will be easier to

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-15 Thread Fabrice Couvreur
Hi Henri, Why does the blue path not rotate 90 with the draw command but rotate with the fill command ? \startMPcode def match (expr alpha, pos) = fill unitsquare xscaled 4cm yscaled 0.2cm rotated alpha shifted pos withcolor yellow ; fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-14 Thread Fabrice Couvreur
Hi, Hi, I have corrected for the dimensions of the ellipse but I cannot achieve the same effect for the red color. Thank you. Fabrice \startMPcode def match (expr pos) = fill unitsquare xscaled 4cm yscaled 0.2cm shifted pos withcolor yellow; fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-14 Thread Fabrice L
Hi, > Le 13 févr. 2020 à 16:45, Fabrice Couvreur a > écrit : > How to have the color defined by {yellow!60!black} with Metapost ? color MyColor ; MyColor := .6[yellow,black] ; See metafun manual, section 1.13. > Thank you. > Fabrice Fabrice (another one !). >

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-14 Thread Fabrice Couvreur
i Henri, Thank you for your answer. The idea is to make the graph as an attachment. I converted to Metapost but the road is still long! The code is from percusse on StackExchange. As you can see, there is a problem with the ellipse. How do I fix this ? Thank you Fabrice \usemodule[tikz]

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-13 Thread Henri Menke
On 2/14/20 10:45 AM, Fabrice Couvreur wrote: > Hi, > How to have the color defined by {yellow!60!black} with Metapost ? \usemodule[tikz] \starttext \startMPcode fill fullsquare scaled 1cm withcolor (.6yellow + black) ; \stopMPcode \starttikzpicture \fill[yellow!60!black] (0,0) rectangle (1,1);

[NTG-context] Metapost and TikZ color code equivalent

2020-02-13 Thread Fabrice Couvreur
Hi, How to have the color defined by {yellow!60!black} with Metapost ? Thank you. Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /