From c492170716830326376e3a612f685df88f753621 Mon Sep 17 00:00:00 2001 From: rodri Date: Tue, 25 Apr 2023 01:52:40 +0000 Subject: draw the points as the user plots a stroke. --- vmodeled/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vmodeled') diff --git a/vmodeled/main.c b/vmodeled/main.c index 635e9e6..2fb8284 100644 --- a/vmodeled/main.c +++ b/vmodeled/main.c @@ -247,6 +247,21 @@ drawaxes(void) line(screen, toscreen(Pt2(512,0,1)), toscreen(Pt2(-512,0,1)), 0, 0, 0, display->white, ZP); } +void +drawstrokepts(void) +{ + Point2 *sp; + Point pt; + + sp = ptstkp; + + while(sp-- > ptstk){ + pt = toscreen(invrframexform(*sp, mainobj)); + fillellipse(screen, pt, 2, 2, ptselcol, ZP); + draw(screen, rectaddpt(Rect(0,0,1,1), pt), display->black, nil, ZP); + } +} + void drawinfo(void) { @@ -269,6 +284,7 @@ redraw(void) draw(screen, screen->r, display->black, nil, ZP); drawaxes(); drawvmodel(screen, mainobj.mdl); + drawstrokepts(); drawinfo(); flushimage(display, 1); unlockdisplay(display); -- cgit v1.2.3