2#ifndef _aspose_system_drawing_rectangle_f_h_
3#define _aspose_system_drawing_rectangle_f_h_
6#include "system/object_ext.h"
7#include "drawing/size_f.h"
8#include "drawing/point_f.h"
10namespace System {
namespace Drawing {
26 ASPOSECPP_SHARED_API
RectangleF(
float x,
float y,
float width,
float height);
58 inline float get_X()
const {
return m_x; }
61 inline void set_X(
float value) { m_x = value; }
64 inline float get_Y()
const {
return m_y; }
67 inline void set_Y(
float value) { m_y = value; }
73 inline void set_Width(
float value) { m_width = value; }
79 inline void set_Height(
float value) { m_height = value; }
83 inline float get_Top()
const {
return m_y; }
85 inline float get_Right()
const {
return (m_x + m_width); }
87 inline float get_Bottom()
const {
return (m_y + m_height); }
92 inline bool get_IsEmpty()
const {
return ((m_width <= 0) || (m_height <= 0)); }
104 ASPOSECPP_SHARED_API
bool Contains(
float x,
float y);
121 ASPOSECPP_SHARED_API
void Inflate(
float width,
float height);
165 ASPOSECPP_SHARED_API
void Offset(
float x,
float y);
229 template<>
struct IsBoxable<Drawing::RectangleF> : std::true_type {};
233 class BoxedValue<
System::Drawing::RectangleF> :
public DefaultBoxedValue<System::Drawing::RectangleF>
239 : DefaultBoxedValue<
System::Drawing::RectangleF>(value)
250 struct hash<
System::Drawing::RectangleF>
BoxedValue(const T &value)
Constructs an object that represents the specified value boxed.
Definition: boxed_value.h:192
Represents a pair of single-precision floating point X and Y coordinates of a point on a 2-dimensiona...
Definition: point_f.h:14
float get_X() const
Returns the value of X coordinate represented by the current object.
Definition: point_f.h:34
float get_Y() const
Returns the value of Y coordinate represented by the current object.
Definition: point_f.h:36
Represents a rectangular area of an image defined as single-precision floating point X and Y coordina...
Definition: rectangle_f.h:15
void set_Location(PointF value)
Sets the location of the upper left corner of the rectangle represented by the current object.
Definition: rectangle_f.h:49
float get_Left() const
Returns the X coordinate of the left edge of the rectangle represented by the current object.
Definition: rectangle_f.h:81
void Offset(const PointF &pos)
Offsets the position of the rectangle represented by the current object by the specified amounts.
void set_X(float value)
Sets the X coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle_f.h:61
void set_Y(float value)
Sets the Y coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle_f.h:67
RectangleF()
Constructs a new instance of RectangleF object that represents a rectangle with X and Y coordinates a...
float get_X() const
Returns the X coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle_f.h:58
void Inflate(float width, float height)
Increases the width and height of the rectangle represented by the current object,...
System::String ToString() const
Returns the string representation of the current object.
Definition: rectangle_f.h:188
float get_Bottom() const
Returns the y coordinate of the bottom edge of the rectangle represented by the current object.
Definition: rectangle_f.h:87
bool Contains(const PointF &point)
Determines if the specified point is located within the rectangle represented by the current object.
bool Contains(float x, float y)
Determines if the specified point is located within the rectangle represented by the current object.
RectangleF(const PointF &location, const SizeF &size)
Constructs a new instance of RectangleF object that represents a rectangle with the coordinates of it...
static const RectangleF Empty
An empty rectangle i.e. a rectangle whose location and size values have zero values.
Definition: rectangle_f.h:184
bool Contains(const RectangleF &rect)
Determines if the specified rectangle is located within the rectangle represented by the current obje...
RectangleF(const Rectangle &rect)
Constructs a new instance of RectangleF object that represents the rectangle equivalent to the specif...
bool get_IsEmpty() const
Determines if X and Y coordinates of the upper left corner of the recangle represented by the current...
Definition: rectangle_f.h:92
RectangleF(float x, float y, float width, float height)
Constructs a new instance of RectangleF object that represents a rectangle with the specified coordin...
float get_Y() const
Returns the Y coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle_f.h:64
PointF get_Location() const
Returns an instance of the PointF class that specifies the location of the upper left corner of the r...
Definition: rectangle_f.h:46
void set_Width(float value)
Sets the width of the rectangle represented by the current object.
Definition: rectangle_f.h:73
static RectangleF Intersect(const RectangleF &a, const RectangleF &b)
Returns a rectangle that is a result of intersection of the specified rectangles.
float get_Top() const
Returns the Y coordinate of the top edge of the rectangle represented by the current object.
Definition: rectangle_f.h:83
SizeF get_Size() const
Returns an instance of the SizeF class that specifies the width and height of the rectangle represent...
Definition: rectangle_f.h:53
float get_Height() const
Returns the height of the rectangle represented by the current object.
Definition: rectangle_f.h:76
static RectangleF Inflate(const RectangleF &rect, float x, float y)
Increases the width and height of the rectangle represented by the specified object,...
bool Equals(const RectangleF &rect) const
Determines if the rectangles represented by the current and the specified objects are identical.
void set_Height(float value)
Sets the height of the rectangle represented by the current object.
Definition: rectangle_f.h:79
friend bool operator==(const RectangleF &rect1, const RectangleF &rect2)
Determines if the rectangles represented by the specified objects are identical.
static RectangleF Union(const RectangleF &a, const RectangleF &b)
Returns a rectangle that is a result of union of the specified rectangles.
bool IntersectsWith(const RectangleF &rect)
Determines if the rectangles represented by the current and specified objects intesect.
float get_Width() const
Returns the width of the rectangle represented by the current object.
Definition: rectangle_f.h:70
friend bool operator!=(const RectangleF &rect1, const RectangleF &rect2)
Determines if the rectangles represented by the specified objects are not identical.
void set_Size(SizeF value)
Sets the width and height of the rectangle represented by the current object.
Definition: rectangle_f.h:56
void Offset(float x, float y)
Offsets the position of the rectangle represented by the current object by the specified amounts.
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.
Definition: rectangle_f.h:42
void Intersect(const RectangleF &rect)
Replaces the rectangle represented by the current object with the rectangle that results from the its...
void Inflate(const SizeF &size)
Increases the width and height of the rectangle represented by the current object,...
int GetHashCode() const
Returns a hash code of the current object.
float get_Right() const
Returns the X coordinate of the right edge of the rectangle represented by the current object.
Definition: rectangle_f.h:85
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left co...
Definition: rectangle.h:19
Represents a pair of single-precision floating point values that represent width and height of an ima...
Definition: size_f.h:14
float get_Height() const
Returns the value of height represented by the current object.
Definition: size_f.h:36
float get_Width() const
Returns the value of width represented by the current object.
Definition: size_f.h:34
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
static String Format(const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args)
Formats string in C# style.
Definition: string.h:1405
std::ostream & operator<<(std::ostream &stream, Color color)
Insert data into the stream using UTF-8 encoding.
Definition: color.h:427
Definition: db_command.h:9
bool operator!=(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:157
bool operator==(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:151