public interface IRectangle extends IRectangularShape, Cloneable
Rectangle
.Modifier and Type | Field and Description |
---|---|
static int |
OUT_BOTTOM
The bitmask that indicates that a point lies below this rectangle.
|
static int |
OUT_LEFT
The bitmask that indicates that a point lies to the left of this rectangle.
|
static int |
OUT_RIGHT
The bitmask that indicates that a point lies to the right of this rectangle.
|
static int |
OUT_TOP
The bitmask that indicates that a point lies above this rectangle.
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
clone()
Returns a mutable copy of this rectangle.
|
Rectangle |
intersection(float rx,
float ry,
float rw,
float rh)
Returns the intersection of the specified rectangle and this rectangle (i.e.
|
Rectangle |
intersection(IRectangle r)
Returns the intersection of the supplied rectangle and this rectangle (i.e.
|
boolean |
intersectsLine(float x1,
float y1,
float x2,
float y2)
Returns true if the specified line segment intersects this rectangle.
|
boolean |
intersectsLine(ILine l)
Returns true if the supplied line segment intersects this rectangle.
|
Point |
location()
Returns a copy of this rectangle's upper-left corner.
|
Point |
location(Point target)
Initializes the supplied point with this rectangle's upper-left corner.
|
int |
outcode(float px,
float py)
Returns a set of flags indicating where the specified point lies in relation to the bounds
of this rectangle.
|
int |
outcode(XY point)
Returns a set of flags indicating where the supplied point lies in relation to the bounds of
this rectangle.
|
Dimension |
size()
Returns a copy of this rectangle's size.
|
Dimension |
size(Dimension target)
Initializes the supplied dimension with this rectangle's size.
|
Rectangle |
union(IRectangle r)
Returns the union of the supplied rectangle and this rectangle (i.e.
|
center, centerX, centerY, frame, frame, height, max, maxX, maxY, min, minX, minY, width, x, y
bounds, bounds, contains, contains, contains, contains, intersects, intersects, isEmpty, pathIterator, pathIterator
static final int OUT_LEFT
outcode(float, float)
.static final int OUT_TOP
outcode(float, float)
.static final int OUT_RIGHT
outcode(float, float)
.static final int OUT_BOTTOM
outcode(float, float)
.Point location()
Point location(Point target)
Dimension size()
Dimension size(Dimension target)
Rectangle intersection(float rx, float ry, float rw, float rh)
Rectangle intersection(IRectangle r)
Rectangle union(IRectangle r)
boolean intersectsLine(float x1, float y1, float x2, float y2)
boolean intersectsLine(ILine l)
int outcode(float px, float py)
OUT_LEFT
, etc.int outcode(XY point)
OUT_LEFT
, etc.Rectangle clone()
Copyright © 2017. All rights reserved.