| Summary: | ellipse contains function | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Sylvain Bi <sylvain.bilange> |
| Component: | GEF Geometry | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.wienand |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
The behavior seems to be fine to me. The ellipse is defined by the enclosing rectangle with top left corner (0, 0) and bottom right corner (1, 1). Therefore, only the center of each segment of that rectangle is contained within the ellipse. Resolving as "works for me", however, feel free to reopen this ticket in case I overlooked the actual issue. |
Ellipse ellipse = new Ellipse(0, 0, 1, 1); Point p = new Point(0, 0); System.out.println("1 " + ellipse.contains(p)); p = new Point(0.5, 0.5); System.out.println("2 " + ellipse.contains(p)); p = new Point(0, 1); System.out.println("3 " + ellipse.contains(p)); Output : 1 false 2 true 3 false