public class RectangleArea extends Handle implements PlaneArea
Constructor and Description |
---|
RectangleArea()
Constructs a new
RectangleAreaAdapter whose top-left corner is
(0, 0) and whose width and height are both zero. |
RectangleArea(int x,
int y,
int width,
int height)
Constructs a new
RectangleAreaAdapter whose top-left corner is
specified as (x, y) and whose width and height are specified by the
arguments of the same name. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y)
Required by the
Shape I/F. |
boolean |
contains(double x,
double y,
double w,
double h)
Required by the
Shape I/F. |
boolean |
contains(Point2D p)
Required by the
Shape I/F. |
boolean |
contains(Rectangle2D r)
Required by the
Shape I/F. |
Rectangle |
getBounds()
Required by the
Shape I/F. |
Rectangle2D |
getBounds2D()
Required by the
Shape I/F. |
PathIterator |
getPathIterator(AffineTransform at)
Required by the
Shape I/F. |
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
Required by the
Shape I/F. |
PlanePoint[] |
getPoints()
Implemented as specified by the
PlaneArea I/F. |
boolean |
intersects(double x,
double y,
double w,
double h)
Required by the
Shape I/F. |
boolean |
intersects(Rectangle2D r)
Required by the
Shape I/F. |
boolean |
onBoundaries(double x,
double y)
Implemented as specified by the
PlaneArea I/F. |
void |
scale(double factor)
Implemented as specified by the
PlaneArea I/F. |
void |
setBounds(int x,
int y,
int width,
int height)
Implemented as specified by the
PlaneArea I/F. |
breakSharing, copy, getBody
public RectangleArea()
RectangleAreaAdapter
whose top-left corner is
(0, 0) and whose width and height are both zero.public RectangleArea(int x, int y, int width, int height)
RectangleAreaAdapter
whose top-left corner is
specified as (x, y) and whose width and height are specified by the
arguments of the same name.x
- The x-coordinate of the top-left corner.y
- The y-coordinate of the top-left corner.width
- The width of the rectangle.height
- The height of the rectangle.public void setBounds(int x, int y, int width, int height)
PlaneArea
I/F.setBounds
in interface PlaneArea
x
- The x-coordinate of the top-left corner.y
- The y-coordinate of the top-left corner.width
- The width of the area.height
- The height of the area.PlaneArea.setBounds(int, int, int, int)
public void scale(double factor)
PlaneArea
I/F.scale
in interface PlaneArea
factor
- The scaling factor.PlaneArea.scale(double)
public PlanePoint[] getPoints()
PlaneArea
I/F.getPoints
in interface PlaneArea
PlaneArea.getPoints()
public boolean onBoundaries(double x, double y)
PlaneArea
I/F.onBoundaries
in interface PlaneArea
x
- The x-coordinate of the point.y
- The y-coordinate of the point.true
if the point is on the boundary,
false
otherwise.PlaneArea.onBoundaries(double, double)
public boolean contains(double x, double y)
Shape
I/F.contains
in interface Shape
Shape.contains(double, double)
public boolean contains(double x, double y, double w, double h)
Shape
I/F.contains
in interface Shape
Shape.contains(double, double, double, double)
public boolean intersects(double x, double y, double w, double h)
Shape
I/F.intersects
in interface Shape
Shape.intersects(double, double, double, double)
public Rectangle getBounds()
Shape
I/F.getBounds
in interface Shape
Shape.getBounds()
public boolean contains(Point2D p)
Shape
I/F.contains
in interface Shape
Shape.contains(Point2D)
public Rectangle2D getBounds2D()
Shape
I/F.getBounds2D
in interface Shape
Shape.getBounds2D()
public boolean contains(Rectangle2D r)
Shape
I/F.contains
in interface Shape
Shape.contains(Rectangle2D)
public boolean intersects(Rectangle2D r)
Shape
I/F.intersects
in interface Shape
Shape.intersects(Rectangle2D)
public PathIterator getPathIterator(AffineTransform at)
Shape
I/F.getPathIterator
in interface Shape
Shape.getPathIterator(AffineTransform)
public PathIterator getPathIterator(AffineTransform at, double flatness)
Shape
I/F.getPathIterator
in interface Shape
Shape.getPathIterator(AffineTransform, double)
Version: 5.2.1-ice35-b15
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.