| Summary: | Ellipse optimization w.r.t. to outline shape should also be added to fill shape. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Nyßen <nyssen> |
| Component: | GEF-Legacy Draw2d | Assignee: | Alexander Nyßen <nyssen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 (Indigo SR1) | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed. Committed changes to cvs HEAD as well as R_3_7_maintenance branch. |
Ellipse#outlineShape() performs some optimizations w.r.t. to eliminating line width effects. This optimization is not performed within fillShape, so that the background may get painted larger than the outlin (see attached screenshot). Ellipse#fillShape() should contain the same optimizations: protected void fillShape(Graphics graphics) { float lineInset = Math.max(1.0f, getLineWidthFloat()) / 2.0f; int inset1 = (int) Math.floor(lineInset); int inset2 = (int) Math.ceil(lineInset); Rectangle r = Rectangle.SINGLETON.setBounds(getBounds()); r.x += inset1; r.y += inset1; r.width -= inset1 + inset2; r.height -= inset1 + inset2; graphics.fillOval(r); }