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