2#ifndef _aspose_system_drawing_rectangle_h_
3#define _aspose_system_drawing_rectangle_h_
6#include <system/object_ext.h>
7#include <system/windows/forms/screen.h>
8#include <system/string.h>
9#include "drawing/size.h"
10#include "drawing/point.h"
12namespace System {
namespace Drawing {
33 ASPOSECPP_SHARED_API
Rectangle(
int x,
int y,
int width,
int height);
67 inline int get_X()
const {
return m_x; }
70 inline void set_X(
int value) { m_x = value; }
73 inline int get_Y()
const {
return m_y; }
76 inline void set_Y(
int value) { m_y = value; }
82 inline void set_Width(
int value) { m_width = value; }
93 inline int get_Top()
const {
return m_y; }
95 inline int get_Right()
const {
return (m_x + m_width); }
97 inline int get_Bottom()
const {
return (m_y + m_height); }
102 inline bool get_IsEmpty()
const {
return (m_x == 0 && m_y == 0 && m_width == 0 && m_height == 0); }
130 ASPOSECPP_SHARED_API
bool Contains(
int x,
int y)
const;
147 ASPOSECPP_SHARED_API
void Inflate(
int width,
int height);
192 ASPOSECPP_SHARED_API
void Offset(
int x,
int y);
262 template<>
struct IsBoxable<Drawing::Rectangle> : std::true_type {};
266 class BoxedValue<
System::Drawing::Rectangle> :
public DefaultBoxedValue<System::Drawing::Rectangle>
272 : DefaultBoxedValue<
System::Drawing::Rectangle>(value)
BoxedValue(const T &value)
Constructs an object that represents the specified value boxed.
Definition: boxed_value.h:192
Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane....
Definition: point.h:15
int get_Y() const
Returns the value of Y coordinate represented by the current object.
Definition: point.h:44
int get_X() const
Returns the value of X coordinate represented by the current object.
Definition: point.h:42
Represents a rectangular area of an image defined as single-precision floating point X and Y coordina...
Definition: rectangle_f.h:15
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left co...
Definition: rectangle.h:19
bool Contains(int x, int y) const
Determines if the specified point is located within the rectangle represented by the current object.
static const Rectangle Empty
An empty rectangle i.e. a rectangle whose location and size values have zero values.
Definition: rectangle.h:221
bool get_IsEmpty() const
Determines if X and Y coordinates of the upper left corner of the recangle represented by the current...
Definition: rectangle.h:102
bool Contains(const Point &point) const
Determines if the specified point is located within the rectangle represented by the current object.
Rectangle()
Constructs a new instance of Rectangle object that represents a rectangle with X and Y coordinates an...
void set_Height(int value)
Sets the height of the rectangle represented by the current object.
Definition: rectangle.h:88
void set_X(int value)
Sets the X coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle.h:70
friend bool operator!=(const Rectangle &rect1, const Rectangle &rect2)
Determines if the rectangles represented by the specified objects are not identical.
bool IntersectsWith(const Rectangle &rect)
Determines if the rectangles represented by the current and specified objects intesect.
static Rectangle Truncate(const RectangleF &rect)
Constructs a Rectangle object from the specified RectangleF object by truncating the RectangleF objec...
static Rectangle Union(const Rectangle &a, const Rectangle &b)
Returns a rectangle that is a result of union of the specified rectangles.
static Rectangle FromLTRB(int left, int top, int right, int bottom)
Constructs a new Rectangle object that represents a rectangle with the specified edge locations.
Definition: rectangle.h:50
static Rectangle Intersect(const Rectangle &a, const Rectangle &b)
Returns a rectangle that is a result of intersection of the specified rectangles.
void set_Y(int value)
Sets the Y coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle.h:76
int get_Height() const
Returns the height of the rectangle represented by the current object.
Definition: rectangle.h:85
void Intersect(const Rectangle &rect)
Replaces the rectangle represented by the current object with the rectangle that results from the its...
int get_Top() const
Returns the Y coordinate of the top edge of the rectangle represented by the current object.
Definition: rectangle.h:93
Rectangle(int x, int y, int width, int height)
Constructs a new instance of Rectangle object that represents a rectangle with the specified coordina...
void Offset(int x, int y)
Offsets the position of the rectangle represented by the current object by the specified amounts.
void Offset(const Point &pos)
Offsets the position of the rectangle represented by the current object by the specified amounts.
int get_Right() const
Returns the X coordinate of the right edge of the rectangle represented by the current object.
Definition: rectangle.h:95
static Rectangle Round(const RectangleF &rect)
Constructs a Rectangle object from the specified RectangleF object by rounding the RectangleF object'...
Rectangle(const System::Windows::Forms::Screen::Rectangle_ &rect)
Constructs a new instance of Rectangle object that represents the rectangle equivalent to the specifi...
void set_Width(int value)
Sets the width of the rectangle represented by the current object.
Definition: rectangle.h:82
bool Equals(const Rectangle &rect) const
Determines if the rectangles represented by the current and the specified objects are identical.
friend bool operator==(const Rectangle &rect1, const Rectangle &rect2)
Determines if the rectangles represented by the specified objects are identical.
void set_Location(Point value)
Sets the location of the upper left corner of the rectangle represented by the current object.
Definition: rectangle.h:57
int get_Width() const
Returns the width of the rectangle represented by the current object.
Definition: rectangle.h:79
void Inflate(const Size &size)
Increases the width and height of the rectangle represented by the current object,...
int get_Bottom() const
Returns the y coordinate of the bottom edge of the rectangle represented by the current object.
Definition: rectangle.h:97
void Inflate(int width, int height)
Increases the width and height of the rectangle represented by the current object,...
Size get_Size() const
Returns an instance of the Size class that specifies the width and height of the rectangle represente...
Definition: rectangle.h:61
int GetHashCode() const
Returns a hash code of the current object.
static Rectangle Inflate(const Rectangle &rect, int x, int y)
Increases the width and height of the rectangle represented by the specified object,...
int get_Left() const
Returns the X coordinate of the left edge of the rectangle represented by the current object.
Definition: rectangle.h:91
int get_X() const
Returns the X coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle.h:67
String ToString() const
Returns the string representation of the current object.
void set_Size(Size value)
Sets the width and height of the rectangle represented by the current object.
Definition: rectangle.h:64
bool Contains(const Rectangle &rect) const
Determines if the specified rectangle is located within the rectangle represented by the current obje...
static Rectangle Ceiling(const RectangleF &rect)
Constructs a Rectangle object from the specified RectangleF object by rounding the RectangleF object'...
Point get_Location() const
Returns an instance of the Point class that specifies the location of the upper left corner of the re...
Definition: rectangle.h:54
Rectangle(const Point &location, const Size &size)
Constructs a new instance of Rectangle object that represents a rectangle with the coordinates of its...
int get_Y() const
Returns the Y coordinate of the upper left corner of the rectangle represented by the current object.
Definition: rectangle.h:73
Represents a pair of integer values that represent width and height of an image. This type should be ...
Definition: size.h:14
int get_Height() const
Returns the value of heght represented by the current object.
Definition: size.h:37
int get_Width() const
Returns the value of width represented by the current object.
Definition: size.h:35
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
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