Hi
On Mon, Dec 2, 2024 at 1:57 PM Jeong Dal via ntg-context
Dear all,
I’d like to hide a part of a path.
I can do that after changing it into an image, but it is not clearly erased. Is there a way to do that not changing it into an image? Thank you for reading.
Best regards,
Dalyoung
\startMPcode path p,q; picture pic; numeric u; u:= 1cm;
p := origin--(2u,0)--(3u,u)--(3u,0)--(4u,0); q := (3u,u)--(3u,0); pic := image(draw p; draw q withcolor white;);
draw pic; \stopMPcode
It is not clear how general you want this to be. For your example you can draw only the parts of p you need. \startMPpage[offset=1DK] path p,q; picture pic; numeric u; u:= 1cm; p := origin--(2u,0)--(3u,u)--(3u,0)--(4u,0); q := (3u,u)--(3u,0); % pic := image(draw p; draw q withcolor white;); % draw pic; draw p withpen pencircle scaled 4 ; draw subpath (0,2) of p && subpath (3,4) of p withpen pencircle scaled 2 withcolor yellow ; \stopMPpage If you need to "cut" in a more advanced way, I suggest to give such an example. /Mikael