ref: c492170716830326376e3a612f685df88f753621
parent: fcc06b383c3490d105b527849dcf0b9d7af8481f
author: rodri <rgl@antares-labs.eu>
date: Mon Apr 24 21:52:40 EDT 2023
draw the points as the user plots a stroke.
--- a/vmodeled/main.c
+++ b/vmodeled/main.c
@@ -248,6 +248,21 @@
}
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 @@
draw(screen, screen->r, display->black, nil, ZP);
drawaxes();
drawvmodel(screen, mainobj.mdl);
+ drawstrokepts();
drawinfo();
flushimage(display, 1);
unlockdisplay(display);