30 void Init (
int xOrg,
int yOrg,
int xHigh,
int yHigh)
46 int Left ()
const {
return origin.x;}
48 int Top ()
const {
return origin.y;}
50 int Right ()
const {
return corner.x;}
52 int Bottom ()
const {
return corner.y;}
55 int Width ()
const {
return (corner.x - origin.x) + 1;}
57 int Height ()
const {
return (corner.y - origin.y) + 1;}
59 int Area ()
const {
return Width() * Height();}
61 double Aspect ()
const {
return ((
double) Width() / (
double) Height());}
64 GEOMDLLIMPEXP
void Limit (
BSIRect const* other);
67 GEOMDLLIMPEXP
void Inset (
int deltaX,
int deltaY);
70 GEOMDLLIMPEXP
void Expand (
int delta);
73 GEOMDLLIMPEXP
void Offset (
int dx,
int dy);
76 GEOMDLLIMPEXP
void Union (
BSIRect const* other);
79 GEOMDLLIMPEXP
bool IsEqual (
BSIRect const* other)
const;
82 GEOMDLLIMPEXP
bool PointInside (
Point2d const&)
const;
85 GEOMDLLIMPEXP
bool Overlap (
BSIRect* overlap,
BSIRect const* other)
const;
88 GEOMDLLIMPEXP
bool IsContained (
BSIRect const* container)
const;
int Bottom() const
Reuturn the corner y coordinate. (Called "Bottom" because screen rectangles advance downward...
Definition: BSIRect.h:52
int Width() const
Return corner.x - origin.x + 1, i.e. pixel width with start end considered inclusive.
Definition: BSIRect.h:55
int Area() const
Return Width() * Height ()
Definition: BSIRect.h:59
Integer x,y rectangle coordinates.
Definition: BSIRect.h:24
int Left() const
Return the origin x coordinate.
Definition: BSIRect.h:46
#define DEFINE_GEOM_STRUCT1(_StructName_)
Definition: msgeomstructs_typedefs.h:40
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
An integer 2d point, useful for screen pixel references, but not for real geometry: Point...
Point2d origin
The rectangle origin.
Definition: BSIRect.h:26
int Top() const
Return the origin y coordinate. (Called "Top" name because screen rectangles start at top left and ad...
Definition: BSIRect.h:48
int Right() const
Return the corner x coordinate.
Definition: BSIRect.h:50
double Aspect() const
Return Width () / Height ()
Definition: BSIRect.h:61
int Height() const
Return corner.y - origin.y + 1, i.e. pixel height with start end considered inclusive.
Definition: BSIRect.h:57
void Init(Point2d const *low, Point2d const *high)
Initialize by direct copy to points. This does NOT enforce ordering.
Definition: BSIRect.h:39
Defines typedefs and constants that can be used across other namespaces. All Bentley-authored C++ sou...
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
Point2d corner
The rectangle corner.
Definition: BSIRect.h:27
void Init(int xOrg, int yOrg, int xHigh, int yHigh)
Initialize by direct copy to points. This does NOT enforce ordering.
Definition: BSIRect.h:30
An integer 2d point, useful for screen pixel references, but not for real geometry.
Definition: Point.h:20