The paper defines a private member variable called mPoints and a public member function named draw. The variable will hold a 2 x n array of x-y corner points, one corner per column. The draw function will create a figure window and plot the corner points using solid, straight-line segments. The first corner will be stored in mPoints (: , 1) , and the last in mPoints ( : , end) . If the shape is supposed to be closed, mPoints (: , 1) must be equal to mPoints ( : ,end). This plan will get us started, with the details worked out during the implementation.
Drawing a Shape, Page 1 of 2
< Previous page Next page > /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch10-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch10-2.gif