Catalano.Imaging.Shapes
Class IntRectangle
- java.lang.Object
-
- Catalano.Imaging.Shapes.IntRectangle
-
public class IntRectangle extends java.lang.ObjectRepresent Rectangle.
-
-
Constructor Summary
Constructors Constructor and Description IntRectangle(double x, double y, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(DoublePoint p, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(float x, float y, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(FloatPoint p, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(int x, int y, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(IntPoint p, int width, int height)Initialize a new instance of the IntRectangle class.IntRectangle(IntRectangle rectangle)Initialize a new instance of the IntRectangle class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IntPoint[]getEdgePoints()Get edge points of rectangle.intgetHeight()Get height of rectangle.intgetWidth()Get Width of rectangle.intgetX()Get X axis coordinate.intgetY()Get Y axis coordinate.booleanisInside(int x, int y)Verify if the point is inside of rectangle.booleanisInside(IntPoint p)Verify if the point is inside of rectangle.booleanisOverlaped(int x, int y, int width, int height)Verify if the rectangle is overlaped.booleanisOverlaped(IntRectangle rect)Verify if the rectangle is overlaped.voidsetHeight(int height)Set height of rectangle.voidsetWidth(int width)Set Width of rectangle.voidsetX(int x)Set X axis coordinate.voidsetY(int y)Set Y axis coordinate.
-
-
-
Constructor Detail
-
IntRectangle
public IntRectangle(int x, int y, int width, int height)Initialize a new instance of the IntRectangle class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(float x, float y, int width, int height)Initialize a new instance of the IntRectangle class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(double x, double y, int width, int height)Initialize a new instance of the IntRectangle class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(IntPoint p, int width, int height)
Initialize a new instance of the IntRectangle class.- Parameters:
p- Point contains X and Y coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(FloatPoint p, int width, int height)
Initialize a new instance of the IntRectangle class.- Parameters:
p- Point contains X and Y coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(DoublePoint p, int width, int height)
Initialize a new instance of the IntRectangle class.- Parameters:
p- Point contains X and Y coordinate.width- Width.height- Height.
-
IntRectangle
public IntRectangle(IntRectangle rectangle)
Initialize a new instance of the IntRectangle class.- Parameters:
rectangle- Ractangle.
-
-
Method Detail
-
getX
public int getX()
Get X axis coordinate.- Returns:
- X axis coordinate.
-
setX
public void setX(int x)
Set X axis coordinate.- Parameters:
x- X axis coordinate.
-
getY
public int getY()
Get Y axis coordinate.- Returns:
- Y axis coordinate.
-
setY
public void setY(int y)
Set Y axis coordinate.- Parameters:
y- Y axis coordinate.
-
getHeight
public int getHeight()
Get height of rectangle.- Returns:
- Height.
-
setHeight
public void setHeight(int height)
Set height of rectangle.- Parameters:
height- Height.
-
getWidth
public int getWidth()
Get Width of rectangle.- Returns:
- Width.
-
setWidth
public void setWidth(int width)
Set Width of rectangle.- Parameters:
width- Width.
-
isInside
public boolean isInside(IntPoint p)
Verify if the point is inside of rectangle.- Parameters:
p- IntPoint contains X and Y coordinate.- Returns:
- True if the rectangle contains, otherwise false.
-
isInside
public boolean isInside(int x, int y)Verify if the point is inside of rectangle.- Parameters:
x- X axis coordinate.y- Y axis coordinate.- Returns:
- True if the rectangle contains, otherwise false.
-
isOverlaped
public boolean isOverlaped(IntRectangle rect)
Verify if the rectangle is overlaped.- Parameters:
rect- Rectangle.- Returns:
- True if is overlaped, otherwise false.
-
isOverlaped
public boolean isOverlaped(int x, int y, int width, int height)Verify if the rectangle is overlaped.- Parameters:
x- X axis coordinate.y- Y axis coordinate.width- Width.height- Height.- Returns:
- True if is overlaped, otherwise false.
-
getEdgePoints
public IntPoint[] getEdgePoints()
Get edge points of rectangle.- Returns:
- Edge points.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG