Hi,
are there now better ways to create rounded pens without adding many
support points?
\starttext
\startMPpage[offset=1dk]
path Halfcircle ; Halfcircle = (1,0){up} for i = 1 upto 180 : .. ((1,0)
rotated i) endfor -- cycle ;
draw Halfcircle scaled 10 shifted (0,12) ;
pen HalfcirclePen ; HalfcirclePen := makepen Halfcircle ;
draw ((0,1) -- (1,1)) scaled 10 withpen HalfcirclePen ;
draw ((0,0) -- (0,1)) scaled 10 withpen HalfcirclePen rotated 90 ;
draw ((1,0) -- (1,1)) scaled 10 withpen HalfcirclePen rotated 270 ;
draw ((0,0) -- (1,0)) scaled 10 withpen HalfcirclePen rotated 180 ;
\stopMPpage
\startMPpage[offset=1dk]
path RoundedRectangle ; RoundedRectangle = (-1,0){up} for i = 180 step
-1 until 89 : .. ((1,0) rotated i) endfor -- (1,1){down} for i = 360
step -1 until 269 : .. ((1,0) rotated i shifted (0,1)) endfor -- cycle ;
draw RoundedRectangle scaled 10 shifted (0,12) ;
pen RoundedRectanglePen ; RoundedRectanglePen := makepen RoundedRectangle ;
draw ((1,0) -- (1,1)) scaled 10 withpen RoundedRectanglePen
reflectedabout (up,down) rotated 270 ;
draw ((0,0) -- (1,0)) scaled 10 withpen RoundedRectanglePen rotated 180 ;
\stopMPpage
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________