Class RectangularPolygon

java.lang.Object
com.xinapse.multisliceimage.roi.RectangularPolygon
All Implemented Interfaces:
Shape

class RectangularPolygon extends Object implements Shape
Substitute for standard class java.awt.geom.Rectangle. Don't use the standard java.awt.geom.Rectangle2D: if we do then getBounds2D always returns the original rectangle, regardless of whether the shape is subsequently changed by intersection etc. The shape of this rectangular polygon is malleable - all checking uses the General Path not the bounds of the original rectangle.
  • Constructor Details

    • RectangularPolygon

      public RectangularPolygon(double x, double y, double width, double height)
      Create a RectangularPolygon at the specified position, with the specified size.
      Parameters:
      x - the x-coordinate of the top left corner.
      y - the y-coordinate of the top left corner.
      width - the width of the RectangularPolygon.
      height - the height of the RectangularPolygon.
  • Method Details