<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>After talking to several members of the class last week it became
apparent that there are those that are really struggling with
getting code running to draw lines. I have built what I think is
a simpler piece of code that uses vectors of structs to build
lines. You are welcome to use it. </p>
<p>Please note that this code builds the vector of points with a
global scope from the mouse functions and does no testing. After
adding each point to the vector it draws all the points and
connects the lines. When the left mouse key is hit it just adds
the initial point to the end of the vector to closes the polygon.
When the middle mouse key is hit the vector of points is cleared
so there is nothing to draw.</p>
<p>Later on we will put the real working code of our programs in the
display function -- but for this program most of it is in the
mouse function and functions called by the mouse function.</p>
<p>You can find the repo on github</p>
<p>git clone <a class="moz-txt-link-freetext" href="https://github.com/drlbs/vmousekeys.git">https://github.com/drlbs/vmousekeys.git</a></p>
<p>As always, let me know if you hve any questions.</p>
<div class="moz-signature">-- <br>
<b><em>Andrew J. Pounds, Ph.D.</em></b><br>
<em>Professor of Chemistry and Computer Science</em><br>
<em>Director of the Computational Science Program</em><br>
<em>Mercer University</em><br>
<em>1501 Mercer University Drive, Macon, GA 31207 </em><br>
<em>(478) 301-5627</em><br>
</div>
</body>
</html>