ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with shading in Metafun (LMTX)
@ 2020-12-21  3:46 Jairo A. del Rio
  2020-12-21  7:45 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jairo A. del Rio @ 2020-12-21  3:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2198 bytes --]

While shading works with MkIV, with LMTX the following breaks:


\startMPpage

comment("two shades with named colors");

fill fullcircle scaled 5cm

withshademethod "circular"

withshadecolors ((1,0,0),(0,0,1,0))

;

fill fullcircle scaled 5cm shifted (6cm,0)

withshademethod "circular"

withcolor (1,0,0,0) shadedinto "blue"

;

\stopMPpage

The log says:

metafun > log >

metafun > log > error: Unknown relation will be considered false

metafun > log >

metapost > log >

metapost > log > <to be read again>

metapost > log > :

metapost > log > <for(100.21985)> if(EXPR0)>temp_any_u:

metapost > log > temp_any_u:=(EXPR0);fi ENDFOR

metapost > log >
max->begingroup.save.temp_any_u;if.pair(EXPR2):pair.temp_any_u.elseif.string(EXPR2):
string.temp_any_u.fi
;temp_any_u=(EXPR2)for.i=(TEXT3):if.i>temp_any_u:temp_any_u:=i;fi.endfor

metapost > log > .temp_any_u.endgroup

metapost > log >
mfun_max_radius->...er(EXPR2)-xpart.center(EXPR2))++(ypart.center(EXPR2)-ypart.lrcorner(EXPR2)),(xpart.urcorner(EXPR2)-xpart.center(EXPR2))++(ypart.urcorner(EXPR2)-ypart.center(EXPR2)))

metapost > log > endgroup

metapost > log >
withshademethod->...cimal.center(EXPR0)withprescript"sh_center_b="&ddecimal.center(EXPR0)withprescript"sh_radius_a="&decimal0withprescript"sh_radius_b="&decimal.mfun_max_radius((EXPR0))

metapost > log > fi

metapost > log > <to be read again>

metapost > log > withprescript

metapost > log >
withshadecolors->...hprescript"sh_color_a_"&decimal.mfun_shade_step&"="&colordecimals(EXPR0)withprescript"sh_color_b_"&decimal.mfun_shade_step&"="&colordecimals(EXPR1)else:withprescript

metapost > log > "sh_color=in...

metapost > log > <*> comment("two shades with named colors"); fill
fullcircle scaled 5cm withshademethod "circular" withshadecolors
((1,0,0),(0,0,1,0))

metafun > log >

metafun > log > Oh dear. I can't decide if the expression above is
positive, negative, or zero.

So this comparison test won't be 'true'.

metafun > log >

metapost > log > ; fill fullcircle scaled 5cm shifted (6cm,0)
withshademethod "...

metapost > log >


Hans told me not to use the B tag, so I'm asking first in case I've missed
something. Thank you in advance.

Best regards,


Jairo

[-- Attachment #1.2: Type: text/html, Size: 6512 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with shading in Metafun (LMTX)
  2020-12-21  3:46 Problem with shading in Metafun (LMTX) Jairo A. del Rio
@ 2020-12-21  7:45 ` Hans Hagen
  2020-12-21 10:58   ` Jairo A. del Rio
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-12-21  7:45 UTC (permalink / raw)
  To: Jairo A. del Rio, mailing list for ConTeXt users

On 12/21/2020 4:46 AM, Jairo A. del Rio wrote:
> While shading works with MkIV, with LMTX the following breaks:
> 
> 
> \startMPpage
> 
> comment("two shades with named colors");
> 
> fill fullcircle scaled 5cm
> 
> withshademethod "circular"
> 
> withshadecolors ((1,0,0),(0,0,1,0))
> 
> ;
> 
> fill fullcircle scaled 5cm shifted (6cm,0)
> 
> withshademethod "circular"
> 
> withcolor (1,0,0,0) shadedinto "blue"
> 
> ;
> 
> \stopMPpage

in mp-base.mpxl there is a ; missing

     temp_any_u = u

must be:

     temp_any_u := u ;

(in the min and max macros)

(i replaced some internal names as part of a cleanup)

(there will be a new upload later that will also fix this)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with shading in Metafun (LMTX)
  2020-12-21  7:45 ` Hans Hagen
@ 2020-12-21 10:58   ` Jairo A. del Rio
  0 siblings, 0 replies; 3+ messages in thread
From: Jairo A. del Rio @ 2020-12-21 10:58 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1293 bytes --]

Nice. It works again. Thank you very much!

Cordially,

Jairo

El lun., 21 de dic. de 2020 2:45 a. m., Hans Hagen <j.hagen@xs4all.nl>
escribió:

> On 12/21/2020 4:46 AM, Jairo A. del Rio wrote:
> > While shading works with MkIV, with LMTX the following breaks:
> >
> >
> > \startMPpage
> >
> > comment("two shades with named colors");
> >
> > fill fullcircle scaled 5cm
> >
> > withshademethod "circular"
> >
> > withshadecolors ((1,0,0),(0,0,1,0))
> >
> > ;
> >
> > fill fullcircle scaled 5cm shifted (6cm,0)
> >
> > withshademethod "circular"
> >
> > withcolor (1,0,0,0) shadedinto "blue"
> >
> > ;
> >
> > \stopMPpage
>
> in mp-base.mpxl there is a ; missing
>
>      temp_any_u = u
>
> must be:
>
>      temp_any_u := u ;
>
> (in the min and max macros)
>
> (i replaced some internal names as part of a cleanup)
>
> (there will be a new upload later that will also fix this)
>
> Hans
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

[-- Attachment #1.2: Type: text/html, Size: 2046 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-21 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21  3:46 Problem with shading in Metafun (LMTX) Jairo A. del Rio
2020-12-21  7:45 ` Hans Hagen
2020-12-21 10:58   ` Jairo A. del Rio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).