xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::rectangle_f Class Reference
Inheritance diagram for xtd::drawing::rectangle_f:
xtd::object xtd::iequatable< rectangle_f > xtd::interface xtd::equality_operators< type_t, equatable_t >

Definition

Stores a set of four floating-point numbers that represent the location and size of a rectangle. For more advanced region functions, use a xtd::drawing::region object.

Stores a set of four floating-point numbers that represent the location and size of a rectangle....
Definition rectangle_f.h:34
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define drawing_export_
Define shared library export.
Definition drawing_export.h:13
Inheritance
xtd::objectxtd::drawing::rectangle_f
Namespace
xtd::drawing
Library
xtd.drawing
Remarks
A rectangle is defined by its width, height, and upper-left corner.

Public Fields

static const rectangle_f empty
 Represents a xtd::drawing::rectangle_F that has xtd::drawing::rectagle_f::x, xtd::drawing::rectangle_f::y, xtd::drawing::rectangle_f::width and xtd::drawing::rectangle_f::height values set to zero.
 

Public Constructors

 rectangle_f () noexcept=default
 Initializes a new instance of the xtd::drawing::rectagle_f class.
 
 rectangle_f (float x, float y, float width, float height) noexcept
 Initializes a new instance of the xtd::drawing::rectagle_f class with the specified location and size.
 
 rectangle_f (const point_f &location, const size_f &size) noexcept
 Initializes a new instance of the xtd::drawing::rectagle_f class with the specified location and size.
 

Public Properties

float bottom () const noexcept
 Gets the y-coordinate that is the sum of the xtd::drawing::rectangle_f::y and xtd::drawing::rectangle_f::height property values of this xtd::drawing::rectangle_f structure.
 
point_f center () const noexcept
 Gets the center property values of this xtd::drawing::rectangle structure.
 
float height () const noexcept
 Gets the height of this xtd::drawing::rectangle_f structure.
 
void height (float height) noexcept
 Sets the height of this xtd::drawing::rectangle_f structure.
 
bool is_empty () const noexcept
 Tests whether all numeric properties of this xtd::drawing::rectangle_f have values of zero.
 
float left () const noexcept
 Gets the x-coordinate of the left edge of this xtd::drawing::rectangle_f structure.
 
point_f location () const noexcept
 Gets the coordinates of the upper-left corner of this xtd::drawing::rectangle_f structure.
 
void location (const point_f &location)
 Sets the coordinates of the upper-left corner of this xtd::drawing::rectangle_f structure.
 
float right () const noexcept
 Gets the x-coordinate that is the sum of xtd::drawing::rectangle_f::x and xtd::drawing::rectangle_f::width property values of this xtd::drawing::rectangle_f structure.
 
size_f size () const noexcept
 Gets the size of this xtd::drawing::rectangle_f.
 
void size (const size_f &size) noexcept
 Sets the size of this xtd::drawing::rectangle_f.
 
float top () const noexcept
 Gets the y-coordinate of the top edge of this xtd::drawing::rectangle_f structure.
 
float width () const noexcept
 Gets the width of this xtd::drawing::rectangle_f structure.
 
void width (float width) noexcept
 Sets the width of this xtd::drawing::rectangle_f structure.
 
float x () const noexcept
 Gets the x-coordinate of the upper-left corner of this xtd::drawing::rectangle_f structure.
 
void x (float x) noexcept
 Sets the x-coordinate of the upper-left corner of this xtd::drawing::rectangle_f structure.
 
float y () const noexcept
 Gets the y-coordinate of the upper-left corner of this xtd::drawing::rectangle_f structure.
 
void y (float y) noexcept
 Sets the y-coordinate of the upper-left corner of this xtd::drawing::rectangle_f structure.
 

Public Methods

void add (const drawing::size_f &sz) noexcept
 Adds this xtd::drawing::rectangle_f by the specified amount.
 
void add (float width, float height) noexcept
 Adds this xtd::drawing::rectangle_f by the specified amount.
 
bool contains (const point_f &pt) const noexcept
 Determines if the specified point is contained within this xtd::drawing::rectangle_f structure.
 
bool contains (const rectangle_f &rect) const noexcept
 Determines if the rectangular region represented by rect is entirely contained within this xtd::drawing::rectangle_f structure.
 
bool contains (float x, float y) const noexcept
 Determines if the specified point is contained within this xtd::drawing::rectangle_f structure.
 
bool equals (const rectangle_f &value) const noexcept override
 
void inflate (const drawing::size_f &sz) noexcept
 Enlarges this xtd::drawing::rectangle_f by the specified amount.
 
void inflate (float width, float height) noexcept
 Enlarges this xtd::drawing::rectangle_f by the specified amount.
 
bool intersects_with (const rectangle_f &rect) const noexcept
 Determines if this rectangle intersects with rect.
 
void make_intersect (const rectangle_f &rect) noexcept
 Replaces this xtd::drawing::rectangle_f with the intersection of itself and the specified xtd::drawing::rectangle_f.
 
void make_union (const rectangle_f &rect) noexcept
 Replaces this xtd::drawing::rectangle_f with the union of itself and the specified xtd::drawing::rectangle_f.
 
void offset (const point_f &pos) noexcept
 Adjusts the location of this rectangle by the specified amount.
 
void offset (float x, float y) noexcept
 Adjusts the location of this rectangle by the specified amount.
 
xtd::string to_string () const noexcept override
 Converts the attributes of this xtd::drawing::rectangle_f to a human-readable string.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
static rectangle_f add (const rectangle_f &rect, float x, float y) noexcept
 Creates and returns an added copy of the specified xtd::drawing::rectangle_f structure. The copy is added by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
static rectangle_f add (const rectangle_f &rect, const drawing::size_f &sz) noexcept
 Creates and returns an added copy of the specified xtd::drawing::rectangle_f structure. The copy is added by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
static rectangle_f from_ltrb (float left, float top, float right, float bottom) noexcept
 Creates a xtd::drawing::rectangle_f structure with the specified edge locations.
 
static rectangle_f inflate (const rectangle_f &rect, const drawing::size_f &sz) noexcept
 Creates and returns an enlarged copy of the specified xtd::drawing::rectangle_f structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
static rectangle_f inflate (const rectangle_f &rect, float width, float height) noexcept
 Creates and returns an enlarged copy of the specified xtd::drawing::rectangle_f structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
static rectangle_f make_intersect (const rectangle_f &a, const rectangle_f &b) noexcept
 Returns a third xtd::drawing::rectangle_f structure that represents the intersection of two other xtd::drawing::rectangle_f structures. If there is no intersection, an empty xtd::drawing::rectangle_f is returned.
 
static rectangle_f make_union (const rectangle_f &a, const rectangle_f &b) noexcept
 Gets a xtd::drawing::rectangle_f structure that contains the union of two xtd::drawing::rectangle_f structures.
 
static rectangle_f offset (const rectangle_f &rect, const point_f &pos) noexcept
 Creates and returns an offsetted copy of the specified xtd::drawing::rectangle_f structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
static rectangle_f offset (const rectangle_f &rect, float x, float y) noexcept
 Creates and returns an offsetted copy of the specified xtd::drawing::rectangle_f structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle_f structure remains unmodified.
 
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Public Member Functions inherited from xtd::iequatable< rectangle_f >
virtual bool equals (const rectangle_f &) const noexcept=0
 Indicates wheth er the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

The documentation for this class was generated from the following file: