Public Member Functions | |
ASPOSECPP_SHARED_API | Rectangle () |
Constructs a new instance of Rectangle object that represents a rectangle with X and Y coordinates and width and hegiht values set to 0. More... | |
ASPOSECPP_SHARED_API | Rectangle (int x, int y, int width, int height) |
ASPOSECPP_SHARED_API | Rectangle (const Point &location, const Size &size) |
ASPOSECPP_SHARED_API | Rectangle (const System::Windows::Forms::Screen::Rectangle_ &rect) |
Point | get_Location () const |
void | set_Location (Point value) |
Size | get_Size () const |
void | set_Size (Size value) |
int | get_X () const |
Returns the X coordinate of the upper left corner of the rectangle represented by the current object. More... | |
void | set_X (int value) |
int | get_Y () const |
Returns the Y coordinate of the upper left corner of the rectangle represented by the current object. More... | |
void | set_Y (int value) |
int | get_Width () const |
Returns the width of the rectangle represented by the current object. More... | |
void | set_Width (int value) |
int | get_Height () const |
Returns the height of the rectangle represented by the current object. More... | |
void | set_Height (int value) |
int | get_Left () const |
Returns the X coordinate of the left edge of the rectangle represented by the current object. More... | |
int | get_Top () const |
Returns the Y coordinate of the top edge of the rectangle represented by the current object. More... | |
int | get_Right () const |
Returns the X coordinate of the right edge of the rectangle represented by the current object. More... | |
int | get_Bottom () const |
Returns the y coordinate of the bottom edge of the rectangle represented by the current object. More... | |
bool | get_IsEmpty () const |
ASPOSECPP_SHARED_API bool | Equals (const Rectangle &rect) const |
ASPOSECPP_SHARED_API bool | Contains (int x, int y) const |
ASPOSECPP_SHARED_API bool | Contains (const Point &point) const |
ASPOSECPP_SHARED_API bool | Contains (const Rectangle &rect) const |
ASPOSECPP_SHARED_API void | Inflate (int width, int height) |
ASPOSECPP_SHARED_API void | Inflate (const Size &size) |
ASPOSECPP_SHARED_API void | Intersect (const Rectangle &rect) |
ASPOSECPP_SHARED_API bool | IntersectsWith (const Rectangle &rect) |
ASPOSECPP_SHARED_API void | Offset (const Point &pos) |
ASPOSECPP_SHARED_API void | Offset (int x, int y) |
bool | operator== (std::nullptr_t) const |
Always returns false. More... | |
bool | operator!= (std::nullptr_t) const |
Always returns true. More... | |
ASPOSECPP_SHARED_API String | ToString () const |
Returns the string representation of the current object. More... | |
ASPOSECPP_SHARED_API int | GetHashCode () const |
Returns a hash code of the current object. More... | |
ASPOSECPP_SHARED_API | operator RectangleF () const |
Static Public Member Functions | |
static Rectangle | FromLTRB (int left, int top, int right, int bottom) |
static ASPOSECPP_SHARED_API Rectangle | Ceiling (const RectangleF &rect) |
static ASPOSECPP_SHARED_API Rectangle | Truncate (const RectangleF &rect) |
static ASPOSECPP_SHARED_API Rectangle | Round (const RectangleF &rect) |
static ASPOSECPP_SHARED_API Rectangle | Inflate (const Rectangle &rect, int x, int y) |
static ASPOSECPP_SHARED_API Rectangle | Intersect (const Rectangle &a, const Rectangle &b) |
static ASPOSECPP_SHARED_API Rectangle | Union (const Rectangle &a, const Rectangle &b) |
Static Public Attributes | |
static const ASPOSECPP_SHARED_API Rectangle | Empty |
An empty rectangle i.e. a rectangle whose location and size values have zero values. More... | |
Friends | |
ASPOSECPP_SHARED_API bool | operator== (const Rectangle &rect1, const Rectangle &rect2) |
ASPOSECPP_SHARED_API bool | operator!= (const Rectangle &rect1, const Rectangle &rect2) |
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left corner and its width and height. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
ASPOSECPP_SHARED_API System::Drawing::Rectangle::Rectangle | ( | ) |
Constructs a new instance of Rectangle object that represents a rectangle with X and Y coordinates and width and hegiht values set to 0.
ASPOSECPP_SHARED_API System::Drawing::Rectangle::Rectangle | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Constructs a new instance of Rectangle object that represents a rectangle with the specified coordinates of its upper left corner and width and height.
x | A value of the X coordinate of the upper left corner of the rectangle |
y | A value of the Y coordinate of the upper left corner of the rectangle |
width | The width of the rectangle |
height | The height of the rectangle |
ASPOSECPP_SHARED_API System::Drawing::Rectangle::Rectangle | ( | const Point & | location, |
const Size & | size | ||
) |
Constructs a new instance of Rectangle object that represents a rectangle with the coordinates of its upper left corner specified as an instance of Point class and its width and height as an instance of Size class.
location | Specifies the location of the upper left corner of the rectangle |
size | Specifies the width and hegiht of the rectangle |
ASPOSECPP_SHARED_API System::Drawing::Rectangle::Rectangle | ( | const System::Windows::Forms::Screen::Rectangle_ & | rect | ) |
Constructs a new instance of Rectangle object that represents the rectangle equivalent to the specified one.
rect | An instance of System::Windows::Forms::Screen::Rectangle_ class that specifies the position and size of the rectangle to be represented by the object being constructed |
|
static |
Constructs a Rectangle object from the specified RectangleF object by rounding the RectangleF object's location and size values to the next higher integer values.
rect | The RectangleF object to convert |
rect
ASPOSECPP_SHARED_API bool System::Drawing::Rectangle::Contains | ( | int | x, |
int | y | ||
) | const |
Determines if the specified point is located within the rectangle represented by the current object.
x | The X coordinate of the point to check |
y | The Y coordinate of the point to check |
ASPOSECPP_SHARED_API bool System::Drawing::Rectangle::Contains | ( | const Point & | point | ) | const |
Determines if the specified point is located within the rectangle represented by the current object.
point | A point to check |
ASPOSECPP_SHARED_API bool System::Drawing::Rectangle::Contains | ( | const Rectangle & | rect | ) | const |
Determines if the specified rectangle is located within the rectangle represented by the current object.
rect | A rectangle to check |
ASPOSECPP_SHARED_API bool System::Drawing::Rectangle::Equals | ( | const Rectangle & | rect | ) | const |
Determines if the rectangles represented by the current and the specified objects are identical.
rect | The Rectangle object to compare the current object with |
|
inlinestatic |
Constructs a new Rectangle object that represents a rectangle with the specified edge locations.
left | The X coordinate of the left edge of the rectangle |
top | The Y coordinate of the top edge of the rectangle |
right | The X coordinate of the right edge of the rectangle |
bottom | The Y coordinate of the bottom edge of the rectangle |
|
inline |
Returns the y coordinate of the bottom edge of the rectangle represented by the current object.
|
inline |
Returns the height of the rectangle represented by the current object.
|
inline |
Determines if X and Y coordinates of the upper left corner of the recangle represented by the current object as well as its width and height have values of 0.
|
inline |
Returns the X coordinate of the left edge of the rectangle represented by the current object.
|
inline |
Returns an instance of the Point class that specifies the location of the upper left corner of the rectangle represented by the current object.
|
inline |
Returns the X coordinate of the right edge of the rectangle represented by the current object.
|
inline |
Returns an instance of the Size class that specifies the width and height of the rectangle represented by the current object.
|
inline |
Returns the Y coordinate of the top edge of the rectangle represented by the current object.
|
inline |
Returns the width of the rectangle represented by the current object.
|
inline |
Returns the X coordinate of the upper left corner of the rectangle represented by the current object.
|
inline |
Returns the Y coordinate of the upper left corner of the rectangle represented by the current object.
ASPOSECPP_SHARED_API int System::Drawing::Rectangle::GetHashCode | ( | ) | const |
Returns a hash code of the current object.
ASPOSECPP_SHARED_API void System::Drawing::Rectangle::Inflate | ( | int | width, |
int | height | ||
) |
Increases the width and height of the rectangle represented by the current object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the specified amounts.
width | The amount by which the width of the rectangle is to be increased in both directions |
height | The amount by which the height of the rectangle is to be increased in both directions |
ASPOSECPP_SHARED_API void System::Drawing::Rectangle::Inflate | ( | const Size & | size | ) |
Increases the width and height of the rectangle represented by the current object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the amounts specified by width and height values of the specified size object correspondingly.
size | The Size object specifying the amounts to increase the width and height of the rectangle by |
|
static |
Increases the width and height of the rectangle represented by the specified object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the specified amounts.
rect | A rectangle to inflate |
x | The amount by which the width of the rectangle is to be increased in both directions |
y | The amount by which the height of the rectangle is to be increased in both directions |
ASPOSECPP_SHARED_API void System::Drawing::Rectangle::Intersect | ( | const Rectangle & | rect | ) |
Replaces the rectangle represented by the current object with the rectangle that results from the its intersection with the rectangle represented by the specified object.
rect | The Rectangle object that represents the rectangle to intersect the rectangle represented by the current object with |
|
static |
Returns a rectangle that is a result of intersection of the specified rectangles.
a | The first rectangle to intersect |
b | The second rectangle to intersect |
a
with b
ASPOSECPP_SHARED_API bool System::Drawing::Rectangle::IntersectsWith | ( | const Rectangle & | rect | ) |
Determines if the rectangles represented by the current and specified objects intesect.
rect | The rectangle to check |
rect
intersect, otherwise - false ASPOSECPP_SHARED_API void System::Drawing::Rectangle::Offset | ( | const Point & | pos | ) |
Offsets the position of the rectangle represented by the current object by the specified amounts.
pos | The Point object that specifies the amount by which the rectangle is offset; the point's X coordinat value specifies the amount to add to the X coordinate of the upper left corner of the rectangle and the point's Y coordinate specifies the amount to add to the Y coordinate of the upper left corner of the rectangle |
ASPOSECPP_SHARED_API void System::Drawing::Rectangle::Offset | ( | int | x, |
int | y | ||
) |
Offsets the position of the rectangle represented by the current object by the specified amounts.
x | The value to add to the current X coordinate of the rectangle |
y | The value to add to the current Y coordinate of the rectangle |
ASPOSECPP_SHARED_API System::Drawing::Rectangle::operator RectangleF | ( | ) | const |
Returns a RectangleF object that represents a rectangle equivalent to the rectangle represented by the current object.
|
inline |
Always returns true.
|
inline |
Always returns false.
|
static |
Constructs a Rectangle object from the specified RectangleF object by rounding the RectangleF object's location and size values to the nearest integer values.
rect | The RectangleF object to convert |
rect
|
inline |
Sets the height of the rectangle represented by the current object.
value | The value to set |
|
inline |
Sets the location of the upper left corner of the rectangle represented by the current object.
value | The value to set |
|
inline |
Sets the width and height of the rectangle represented by the current object.
value | An instance of Size class specifying the width and height values to set |
|
inline |
Sets the width of the rectangle represented by the current object.
value | The value to set |
|
inline |
Sets the X coordinate of the upper left corner of the rectangle represented by the current object.
value | The value to set |
|
inline |
Sets the Y coordinate of the upper left corner of the rectangle represented by the current object.
value | The value to set |
ASPOSECPP_SHARED_API String System::Drawing::Rectangle::ToString | ( | ) | const |
Returns the string representation of the current object.
|
static |
Constructs a Rectangle object from the specified RectangleF object by truncating the RectangleF object's location and size values to the next lower integer values.
rect | The RectangleF object to convert |
rect
|
static |
Returns a rectangle that is a result of union of the specified rectangles.
a | The first rectangle to union |
b | The second rectangle to union |
a
with b
Determines if the rectangles represented by the specified objects are not identical.
rect1 | The first rectangle to compare |
rect2 | The second rectangle to compare |
rect1
and rect2 are not identical, otherwise - false Determines if the rectangles represented by the specified objects are identical.
rect1 | The first rectangle to compare |
rect2 | The second rectangle to compare |
rect1
and rect2 are identical, otherwise - false
|
static |
An empty rectangle i.e. a rectangle whose location and size values have zero values.