@@ -2397,6+2384,7 @@ Point DrawingView::SnapPointToGrid(Point point)
point.y = floor(point.y);
point.z = 0; // Make *sure* Z doesn't go anywhere!!!
point *= Global::gridSpacing;
+
return point;
}
@@ -2441,68+2429,14 @@ Rect DrawingView::GetObjectExtents(Object * obj)
case OTArc:
{
Arc * a = (Arc *)obj;
+ rect = a->Bounds();
+ break;
+ }
- double start = a->angle[0];
- double end = start + a->angle[1];
-
- // Swap 'em if the span is negative...
- if (a->angle[1] < 0)
- {
- end = a->angle[0];
- start = end + a->angle[1];
- }
-
- rect = Rect(Point(cos(start), sin(start)), Point(cos(end), sin(end)));
-
- // If the end of the arc is before the beginning, add 360 degrees to it
- if (end < start)
- end += TAU;
-
-/*
-Find which quadrant the start angle is in (consider the beginning of the 90° angle to be in the quadrant, the end to be in the next quadrant). Then, divide the span into 90° segments. The integer portion is the definite axis crossings; the remainder needs more scrutiny. There will be an additional axis crossing if the the sum of the start angle and the remainder is > 90°.