Re: [NTG-context] metafun / patterns

2021-03-25 Thread Aditya Mahajan
On Thu, 25 Mar 2021, Hans Hagen wrote:

> Hi,
> 
> As I'm still in metafun (and svg) mode I decided to support patterns 
> (that are already supported at the tex end) also in metafun. As there 
> has never been demands I suppose it's not that interesting but it sort 
> of fits in.
> 
> There are some tricky aspectx involved so the interface might evolve a 
> bit (some more control options) but here are some examples anyway:

This is nice! I have used something like this in the past (but with "manual 
clipping", which is always cumbersome for irregular shapes).

Aditya
 
___
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
___


Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Sorry for the noise, my fault: Thunderbird replaced some semicolon 
combinations with emojis, so they were missing when I copied and pasted 
them in a source file.


Massi

Il 25/03/21 15:14, mf ha scritto:

Il 25/03/21 14:11, Hans Hagen ha scritto:


\startMPpage[offset=1cm]
 draw (fullcircle scaled 5cm shifted (0cm,0cm))
 withpattern image (fill fullcircle scaled 1cm withcolor 
"darkblue" ;)

 withpatternscale (1/10,1/10)
 ;

 draw (fullcircle scaled 5cm shifted (5cm,0cm))
 withpattern image (fill fullcircle scaled 5mm withcolor 
"darkred" ;)

 withpatternscale (1/20,1/20)
 ;

 draw (fullcircle scaled 5cm shifted (10cm,0cm))
 withpattern image (fill fullcircle scaled 5mm withcolor 
"darkgreen" ;)

 withpatternscale (1/40,1/40)
 ;

 draw (fullcircle scaled 5cm shifted (0cm,5cm))
 withpattern image (fill fullcircle scaled 1cm withcolor 
"darkcyan" ;)

 withpatternscale (1/10,1/20)
 ;

 draw (fullcircle scaled 5cm shifted (5cm,5cm))
 withpattern image (fill fullcircle scaled 5mm withcolor 
"darkmagenta" ;)

 withpatternscale (1/20,1/40)
 ;

 draw (fullcircle scaled 5cm shifted (10cm,5cm))
 withpattern image (fill fullcircle scaled 5mm withcolor 
"darkyellow" ;)

 withpatternscale (1/40,1/80)
 ;
\stopMPpage

\startMPpage[offset=1cm]
 fill fullcircle scaled 11cm
 withcolor "darkyellow" ;

 draw fullcircle scaled 10cm
 withpattern image (fill fullcircle scaled 1cm withcolor 
"darkblue" ;)

 ;

 draw fulldiamond scaled 8cm
 withpattern image (fill fulldiamond scaled 4mm withcolor 
"darkgreen" ;)

 rotated 15
 ;

 draw fulltriangle scaled 9cm
 withpattern image (fill fulltriangle scaled 3mm withcolor 
"white" ;)

 rotated 45
 ;

 draw fullcircle scaled 10cm
 withpattern image (draw textext("!") withcolor "middlegray" ;)
 rotated 45
 ;

 draw fullcircle scaled 10cm
 withpen pencircle scaled 1mm
 withcolor "darkgray" ;
\stopMPpage



Those first two pages appear 20x20mm and blank.

Page 3 and 4 show patterns instead.

Massi
___ 

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
___ 


___
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
___


Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf

Il 25/03/21 14:11, Hans Hagen ha scritto:


\startMPpage[offset=1cm]
     draw (fullcircle scaled 5cm shifted (0cm,0cm))
     withpattern image (fill fullcircle scaled 1cm withcolor 
"darkblue" ;)

     withpatternscale (1/10,1/10)
     ;

     draw (fullcircle scaled 5cm shifted (5cm,0cm))
     withpattern image (fill fullcircle scaled 5mm withcolor 
"darkred" ;)

     withpatternscale (1/20,1/20)
     ;

     draw (fullcircle scaled 5cm shifted (10cm,0cm))
     withpattern image (fill fullcircle scaled 5mm withcolor 
"darkgreen" ;)

     withpatternscale (1/40,1/40)
     ;

     draw (fullcircle scaled 5cm shifted (0cm,5cm))
     withpattern image (fill fullcircle scaled 1cm withcolor 
"darkcyan" ;)

     withpatternscale (1/10,1/20)
     ;

     draw (fullcircle scaled 5cm shifted (5cm,5cm))
     withpattern image (fill fullcircle scaled 5mm withcolor 
"darkmagenta" ;)

     withpatternscale (1/20,1/40)
     ;

     draw (fullcircle scaled 5cm shifted (10cm,5cm))
     withpattern image (fill fullcircle scaled 5mm withcolor 
"darkyellow" ;)

     withpatternscale (1/40,1/80)
     ;
\stopMPpage

\startMPpage[offset=1cm]
     fill fullcircle scaled 11cm
     withcolor "darkyellow" ;

     draw fullcircle scaled 10cm
     withpattern image (fill fullcircle scaled 1cm withcolor 
"darkblue" ;)

     ;

     draw fulldiamond scaled 8cm
     withpattern image (fill fulldiamond scaled 4mm withcolor 
"darkgreen" ;)

     rotated 15
     ;

     draw fulltriangle scaled 9cm
     withpattern image (fill fulltriangle scaled 3mm withcolor 
"white" ;)

     rotated 45
     ;

     draw fullcircle scaled 10cm
     withpattern image (draw textext("!") withcolor "middlegray" ;)
     rotated 45
     ;

     draw fullcircle scaled 10cm
     withpen pencircle scaled 1mm
     withcolor "darkgray" ;
\stopMPpage



Those first two pages appear 20x20mm and blank.

Page 3 and 4 show patterns instead.

Massi
___
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
___