xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <rectangle.h>
Stores a set of four integers that represent the location and size of a rectangle.
Inherits xtd::object.
Static Public Attributes | |
static const rectangle | empty |
Public Member Functions | |
rectangle (const point &location, const drawing::size &size) | |
rectangle (int32_t x, int32_t y, int32_t width, int32_t height) | |
int32_t | bottom () const |
bool | contains (const point &pt) const |
bool | contains (const rectangle &rect) const |
bool | contains (int32_t x, int32_t y) const |
int32_t | height () const |
void | height (int32_t height) |
void | inflate (const drawing::size &sz) |
void | inflate (int width, int height) |
bool | intersects_with (const rectangle &rect) const |
bool | is_empty () const |
int32_t | left () const |
void | left (int32_t left) |
point | location () const |
void | location (const point &location) |
void | make_intersect (const rectangle &rect) |
void | make_union (const rectangle &rect) |
void | offset (const point &pt) |
void | offset (int32_t dx, int32_t dy) |
int32_t | right () const |
drawing::size | size () const |
void | size (const drawing::size &size) |
xtd::ustring | to_string () const noexcept override |
Returns a std::string that represents the current object. | |
int32_t | top () const |
void | top (int32_t top) |
int32_t | width () const |
void | width (int32_t width) |
int32_t | x () const |
void | x (int32_t x) |
int32_t | y () const |
void | y (int32_t y) |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. | |
Static Public Member Functions | |
static rectangle | ceiling (const rectangle_f &rect) |
static rectangle | from_ltrb (int32_t left, int32_t top, int32_t right, int32_t bottom) |
static rectangle | inflate (const rectangle &rect, const drawing::size &sz) |
static rectangle | inflate (const rectangle &rect, int width, int height) |
static rectangle | make_intersect (const rectangle &a, const rectangle &b) |
static rectangle | make_union (const rectangle &a, const rectangle &b) |
static rectangle | offset (const rectangle &rect, const point &pt) |
static rectangle | offset (const rectangle &rect, int x, int y) |
static rectangle | round (const rectangle_f &rect) |
static rectangle | trunc (const rectangle_f &rect) |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
|
inlineoverridevirtualnoexcept |
Returns a std::string that represents the current object.
Reimplemented from xtd::object.