aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-04-25 01:52:40 +0000
committerrodri <rgl@antares-labs.eu>2023-04-25 01:52:40 +0000
commitc492170716830326376e3a612f685df88f753621 (patch)
treee829f7e61f05fde27dfafb943a165b08a8e16acc
parentfcc06b383c3490d105b527849dcf0b9d7af8481f (diff)
downloadmusw-c492170716830326376e3a612f685df88f753621.tar.gz
musw-c492170716830326376e3a612f685df88f753621.tar.bz2
musw-c492170716830326376e3a612f685df88f753621.zip
draw the points as the user plots a stroke.
-rw-r--r--vmodeled/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/vmodeled/main.c b/vmodeled/main.c
index 635e9e6..2fb8284 100644
--- a/vmodeled/main.c
+++ b/vmodeled/main.c
@@ -248,6 +248,21 @@ drawaxes(void)
}
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)
{
Point p;
@@ -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);