Returns the outline of this selection as a Polygon. @see ij.process.ImageProcessor#setRoi @see ij.process.ImageProcessor#drawPolygon @see ij.process.ImageProcessor#fillPolygon
()
| 587 | @see ij.process.ImageProcessor#fillPolygon |
| 588 | */ |
| 589 | public Polygon getPolygon() { |
| 590 | int[] xpoints = new int[4]; |
| 591 | int[] ypoints = new int[4]; |
| 592 | xpoints[0] = x; |
| 593 | ypoints[0] = y; |
| 594 | xpoints[1] = x+width; |
| 595 | ypoints[1] = y; |
| 596 | xpoints[2] = x+width; |
| 597 | ypoints[2] = y+height; |
| 598 | xpoints[3] = x; |
| 599 | ypoints[3] = y+height; |
| 600 | return new Polygon(xpoints, ypoints, 4); |
| 601 | } |
| 602 | |
| 603 | /** Returns the outline of this selection as a FloatPolygon */ |
| 604 | public FloatPolygon getFloatPolygon() { |
no outgoing calls
no test coverage detected