I am currently trying to understand the l3draw package defined functions and looked at the example:
\dim_new:N \l_mypos_dim
\draw_begin:
\draw_path_moveto:n { 0cm , \l_mypos_dim } % Coordinate (0,0) move to
\draw_path_lineto:n { 1cm , \l_mypos_dim } % (1,0) horizontally.
\dim_set:Nn \l_mypos_dim { 1cm } % Define the new y-coordinate.
\draw_path_lineto:n { 1cm , \l_mypos_dim } % Draw from (1,0)--(1,1).
\draw_path_close: % Close path from (1,1)--(0,0).
\draw_path_use_clear:n { stroke }
\draw_end:
Are the comments the correct interpretation?
My objective is to replicate the answer here: A symbol of a graph of a function without to use TikZ and similar just for fun.
(0,0) -- (1,0) -- (1,1) -- cycle;(in the equivalent TikZ notation). – Skillmon Jan 09 '20 at 21:29In general, for reliable treatment by viewers, a \draw_path_moveto:n operation should precede the first use of a \draw_- path_lineto:n on a path.– azetina Jan 09 '20 at 21:33move to (0,0) and draw to (1,0) horizontally– Skillmon Jan 09 '20 at 21:34\l_mypos_dim– egreg Jan 09 '20 at 21:49;-)– egreg Jan 09 '20 at 22:25In this example it isn't clear if the value is zero. Maybe it is predefined in the code.
And the command:
means the path will be closed connecting to the first defined point.
– Emílio Kavamura Jan 16 '20 at 01:01