Refining line drawing

With fields in place to track various points, you can refine an application's line drawing. When drawing lines, track the point where the line starts with the Origin field. Origin must be set to the point where the mouse-down event occurs, so the mouse-up event handler can use Origin to place the beginning of the line, as in this code procedure TForm1.FormMouseDown(Sender TObject Button TMouseButton Shift TShiftState X, Y Integer) Drawing True Canvas.MoveTo(X, Y) Origin Point(X, Y) record where...