-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Description
When CircularDrawingDelegate.drawArc() draws a full circle (360°) track, there is a visible seam artifact at the 0° position where the start and end points overlap.
Root Cause
drawArc() always has a start/end point. When cornerRadius > 0:
- With
Cap.ROUND: Two round caps overlap at 0°, creating a visible bump - With
drawRoundedBlock: Two rounded blocks overlap at the same position
The ROUND_CAP_RAMP_DOWN logic extends the arc beyond 360° to hide caps, but anti-aliasing still produces a visible rendering artifact at the seam.
CircularProgressIndicator.mov
Expected Behavior
A full circle track should render as a perfect circle with no visible seam or artifact.
Proposed Fix
When arcDegree >= 360f and the path is not wavy, use canvas.drawOval() instead of canvas.drawArc(). drawOval has no start/end point concept, so the seam artifact is eliminated entirely.
drawArc (current) |
drawOval (proposed) |
|
|---|---|---|
| Start/end point | Exists (0° seam) | None |
| Cap needed | ROUND/BUTT + roundedBlock | Unnecessary (BUTT suffices) |
| 360° rendering | Cap overlap artifact | Perfect circle |
Partial arcs (indicators) continue to use the existing drawArc logic unchanged.
Affected Component
CircularDrawingDelegate.java - drawArc() method