- }
-
- if (xpos > -1 && ypos > -1 && event.Dragging())
- {
- if (!currentSegment)
- currentSegment = new DoodleSegment;
-
- DoodleLine *newLine = new DoodleLine;
- newLine->x1 = (long)xpos;
- newLine->y1 = (long)ypos;
- newLine->x2 = pt.x;
- newLine->y2 = pt.y;
- currentSegment->lines.Append(newLine);
-
- dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y);
- }
- xpos = pt.x;
- ypos = pt.y;