Bruce Horrocks schrieb am 01.12.2024 um 11:45:
On 1 Dec 2024, at 09:51, Wolfgang Schuster <wolfgang.schuster.li...@gmail.com>
wrote:
While I can get the desired result which a filled path I'm looking for a
solution where I have to set fewer control points.
Draw the paths two grid squares sorter and at each end draw a “dot” which is a
triangle of the right direction and shading?
So your first line
draw (1,7) -- (7,7) ;
becomes
triangle_dot_bottom_right_fill (1,7) ; draw (2,6) ;
triangle_dot_bottom_left_fill (7,7) ;
If there are load of them then it might be easier to write a macro to walk the
(1,7) — (7,7) path and insert “dots” at the changes of direction.
I had this in my mind but wasn't sure if this is the best solution.
Using a macro to create the line is a must here but I have to think how
to set which delimiters for the line should be used (using different
macros for each variation or passing the shape as argument).
BTW: Use && to connect the parts of the line to avoid graphical errors
in your pdf viewer.
\startMPpage[offset=1pt]
pickup pensquare scaled 1 ;
draw (0,0) ;
draw (1,0) ;
draw (0,2) && (1,2) ;
\stopMPpage
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
___________________________________________________________________________________