Bezier Curves and Complex Drawings.
These notes cover complex drawing operations, such as arcs and 
Bezier curves. In general these involve a sequence of mouse 
operations , each involving a different drawing mode and style.
We use two (or in some cases three) parameters to control such
operations.
   DrawingStyle is a parameter in the drawing procedure which
determines what is actually drawn on the screen at each stage.
   DrawingMode is a parameter in the main program used to 
determine the response to each event such as a button-click or 
a mouse movement.
   DisplayStyle is a third parameter sometimes used to control
the style of display. For example, initial drawing operations 
may only use thin black lines while at a later stage colur, 
dotting of the line and fill for closed objects may be added.

   As an example, here is the sequence of operations used in 
GLE95 to draw a Bezier curve. Before starting DrawingStyle is 0 
and DrawingMode is 0.
   On clicking the Bezier Button the DrawingObject is set as 
dtBezier and the boolean flag NewDrawObject is set to True.
Mousemode is also set to True for mouse operations.
When the left or right mouse buttons are pressed the starting 
point is set either as the last end point (left button) or
current  mouse point (right button). The canvas pen mode is
set to pmNotXor - which results in drawing NotXor with the
existing screen, effectively cancelling any previos drawing 
below. For a Bezier curve the start is assigned to point CStart 
and the end to CEnd. For the very first operation the 
DrawingStyle is then set to 2, and DrawingMode incremented 
to 1. A straight line is drawn from Cstart to Cend with 
control hot-spots added as circles. 
   On moving the mouse this line is redrawn, thereby erasing it
and then drawn again to the new end point. This effectively 
drags the line to follow the mouse. This continues till the 
mouse button is lifted. This alters the DrawingMode to 2.
Thus on the next Mousedown action the initial drawing of the 
line is omitted (since the line is already displayed and so 
the mousemove routine now operates as specified by mode 2.
For mode 2 this merely redraws the existing curve until the
mouse moves on to a hotspot.At this point the DrawingMode and 
Style are both changed to 3, 4 or 5. Each of these redraws the 
Bezier curve as defined by the relevant hot-spot in the next
move cycle. On lifting the mouse button modes 3,4 and 5 all 
return to mode 2. If however the @Insert' key has been pressed 
a parameter SETCUrve is now True and when hot spot Cend is next 
encountered the mode switches to 6.Mode 6 draws the curve in 
its final form without hot-spots and resets drawing mode 0 (no
actions). When the key is lifted in mode 6 a final permanent
drawing operation takes place and the relevant data is recorded.
