CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
Represents a rectangular area of an image defined as single-precision floating point 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. More...
#include <rectangle_f.h>
Public Member Functions | |
RectangleF () | |
Constructs a new instance of RectangleF object that represents a rectangle with X and Y coordinates and width and hegiht values set to 0. More... | |
RectangleF (float x, float y, float width, float height) | |
Constructs a new instance of RectangleF object that represents a rectangle with the specified coordinates of its upper left corner and width and height. More... | |
RectangleF (const PointF &location, const SizeF &size) | |
Constructs a new instance of RectangleF object that represents a rectangle with the coordinates of its upper left corner specified as an instance of PointF class and its width and height as an instance of SizeF class. More... | |
RectangleF (const Rectangle &rect) | |
Constructs a new instance of RectangleF object that represents the rectangle equivalent to the specified one. More... | |
PointF | get_Location () const |
Returns an instance of the PointF class that specifies the location of the upper left corner of the rectangle represented by the current object. More... | |
void | set_Location (PointF value) |
Sets the location of the upper left corner of the rectangle represented by the current object. More... | |
SizeF | get_Size () const |
Returns an instance of the SizeF class that specifies the width and height of the rectangle represented by the current object. More... | |
void | set_Size (SizeF value) |
Sets the width and height of the rectangle represented by the current object. More... | |
float | get_X () const |
Returns the X coordinate of the upper left corner of the rectangle represented by the current object. More... | |
void | set_X (float value) |
Sets the X coordinate of the upper left corner of the rectangle represented by the current object. More... | |
float | get_Y () const |
Returns the Y coordinate of the upper left corner of the rectangle represented by the current object. More... | |
void | set_Y (float value) |
Sets the Y coordinate of the upper left corner of the rectangle represented by the current object. More... | |
float | get_Width () const |
Returns the width of the rectangle represented by the current object. More... | |
void | set_Width (float value) |
Sets the width of the rectangle represented by the current object. More... | |
float | get_Height () const |
Returns the height of the rectangle represented by the current object. More... | |
void | set_Height (float value) |
Sets the height of the rectangle represented by the current object. More... | |
float | get_Left () const |
Returns the X coordinate of the left edge of the rectangle represented by the current object. More... | |
float | get_Top () const |
Returns the Y coordinate of the top edge of the rectangle represented by the current object. More... | |
float | get_Right () const |
Returns the X coordinate of the right edge of the rectangle represented by the current object. More... | |
float | get_Bottom () const |
Returns the y coordinate of the bottom edge of the rectangle represented by the current object. More... | |
bool | get_IsEmpty () const |
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. More... | |
bool | Equals (const RectangleF &rect) const |
Determines if the rectangles represented by the current and the specified objects are identical. More... | |
bool | Contains (float x, float y) |
Determines if the specified point is located within the rectangle represented by the current object. More... | |
bool | Contains (const PointF &point) |
Determines if the specified point is located within the rectangle represented by the current object. More... | |
bool | Contains (const RectangleF &rect) |
Determines if the specified rectangle is located within the rectangle represented by the current object. More... | |
void | Inflate (float width, float 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. More... | |
void | Inflate (const SizeF &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. More... | |
void | Intersect (const RectangleF &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. More... | |
bool | IntersectsWith (const RectangleF &rect) |
Determines if the rectangles represented by the current and specified objects intesect. More... | |
void | Offset (const PointF &pos) |
Offsets the position of the rectangle represented by the current object by the specified amounts. More... | |
void | Offset (float x, float y) |
Offsets the position of the rectangle represented by the current object by the specified amounts. More... | |
bool | operator== (std::nullptr_t) const |
Always returns false. More... | |
bool | operator!= (std::nullptr_t) const |
Always returns true. More... | |
int | GetHashCode () const |
Returns a hash code of the current object. More... | |
System::String | ToString () const |
Returns the string representation of the current object. More... | |
Static Public Member Functions | |
static RectangleF | FromLTRB (float left, float top, float right, float bottom) |
Constructs a new RectangleF object that represents a rectangle with the specified edge locations. More... | |
static RectangleF | Inflate (const RectangleF &rect, float x, float y) |
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. More... | |
static RectangleF | Intersect (const RectangleF &a, const RectangleF &b) |
Returns a rectangle that is a result of intersection of the specified rectangles. More... | |
static RectangleF | Union (const RectangleF &a, const RectangleF &b) |
Returns a rectangle that is a result of union of the specified rectangles. More... | |
Static Public Attributes | |
static const RectangleF | Empty |
An empty rectangle i.e. a rectangle whose location and size values have zero values. More... | |
Represents a rectangular area of an image defined as single-precision floating point 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.
System::Drawing::RectangleF::RectangleF | ( | ) |
Constructs a new instance of RectangleF object that represents a rectangle with X and Y coordinates and width and hegiht values set to 0.
System::Drawing::RectangleF::RectangleF | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
Constructs a new instance of RectangleF 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 |
Constructs a new instance of RectangleF object that represents a rectangle with the coordinates of its upper left corner specified as an instance of PointF class and its width and height as an instance of SizeF class.
location | Specifies the location of the upper left corner of the rectangle |
size | Specifies the width and hegiht of the rectangle |
|
explicit |
Constructs a new instance of RectangleF object that represents the rectangle equivalent to the specified one.
rect | An instance of Rectangle class that specifies the position and size of the rectangle to be represented by the object being constructed |
bool System::Drawing::RectangleF::Contains | ( | const PointF & | point | ) |
Determines if the specified point is located within the rectangle represented by the current object.
point | A point to check |
bool System::Drawing::RectangleF::Contains | ( | const RectangleF & | rect | ) |
Determines if the specified rectangle is located within the rectangle represented by the current object.
rect | A rectangle to check |
bool System::Drawing::RectangleF::Contains | ( | float | x, |
float | y | ||
) |
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 |
bool System::Drawing::RectangleF::Equals | ( | const RectangleF & | rect | ) | const |
Determines if the rectangles represented by the current and the specified objects are identical.
rect | The RectangleF object to compare the current object with |
|
inlinestatic |
Constructs a new RectangleF 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 PointF 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 SizeF 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.
int System::Drawing::RectangleF::GetHashCode | ( | ) | const |
Returns a hash code of the current object.
|
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 |
void System::Drawing::RectangleF::Inflate | ( | const SizeF & | 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 SizeF object specifying the amounts to increase the width and height of the rectangle by |
void System::Drawing::RectangleF::Inflate | ( | float | width, |
float | 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 |
|
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
void System::Drawing::RectangleF::Intersect | ( | const RectangleF & | 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 RectangleF object that represents the rectangle to intersect the rectangle represented by the current object with |
bool System::Drawing::RectangleF::IntersectsWith | ( | const RectangleF & | rect | ) |
Determines if the rectangles represented by the current and specified objects intesect.
rect | The rectangle to check |
rect
intersect, otherwise - false void System::Drawing::RectangleF::Offset | ( | const PointF & | pos | ) |
Offsets the position of the rectangle represented by the current object by the specified amounts.
pos | The PointF 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 |
void System::Drawing::RectangleF::Offset | ( | float | x, |
float | 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 |
|
inline |
Always returns true.
|
inline |
Always returns false.
|
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 SizeF 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 |
|
inline |
Returns the string representation of the current object.
|
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
|
static |
An empty rectangle i.e. a rectangle whose location and size values have zero values.