2#ifndef _aspose_system_drawing_point_h_
3#define _aspose_system_drawing_point_h_
6#include <system/string.h>
7#include <system/boxed_value.h>
10namespace System {
namespace Drawing {
14 class ASPOSECPP_SHARED_CLASS
Point
16 RTTI_INFO_VALUE_TYPE(
Point)
23 ASPOSECPP_SHARED_API
Point(
int x,
int y);
34 ASPOSECPP_SHARED_API
Point(
int dw);
39 inline bool get_IsEmpty()
const {
return (m_x == 0 && m_y == 0); }
42 inline int get_X()
const {
return m_x; }
44 inline int get_Y()
const {
return m_y; }
48 inline void set_X(
int value) { m_x = value; }
51 inline void set_Y(
int value) { m_y = value; }
100 inline void Offset(
int dx,
int dy) { m_x += dx; m_y += dy; }
108 ASPOSECPP_SHARED_API
operator PointF()
const;
111 ASPOSECPP_SHARED_API
operator Size()
const;
156 inline int hi_word(
int n) {
return ((n >> 16) & 0xffff); }
160 inline int lo_word(
int n) {
return (n & 0xffff); }
196 template<>
struct IsBoxable<Drawing::
Point> : std::true_type {};
200 class BoxedValue<
System::Drawing::Point> :
public DefaultBoxedValue<System::Drawing::Point>
215 template<>
struct hash<
System::Drawing::Point>
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
Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane....
Definition: point.h:15
friend bool operator<(const Point &point1, const Point &point2)
Always throws InvalidOperationException.
void Offset(Point point)
Offsets the X and Y coordinates represented by the current object by the values of X and Y coordinate...
Definition: point.h:104
bool get_IsEmpty() const
Determines if both X and Y coordinates values are equal to 0.
Definition: point.h:39
void Offset(int dx, int dy)
Offsets the X and Y coordinates value represented by the current object by the specified values.
Definition: point.h:100
static Point Add(const Point &point, const Size &size)
Adds the width and height values of the specified Size object to the X and Y coordinates values of th...
Point(int x, int y)
Constructs a new Point object and initializes it with the specified values.
static Point Round(const PointF &point)
Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y co...
static Point Ceiling(const PointF &point)
Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y co...
Point(int dw)
Constructs a new Point object and initializes its X coordinate value with a value formed by high 16 b...
friend bool operator==(const Point &point1, const Point &point2)
Determines if the specified Point objects are equal, i.e. represent the same pair of X and Y coordina...
bool IsNull() const
Always returns false.
Definition: point.h:148
friend Point operator+(const Point &point, const Size &size)
Adds the width and height values of the specified Size object to the X and Y coordinates values of th...
int get_Y() const
Returns the value of Y coordinate represented by the current object.
Definition: point.h:44
String ToString() const
Returns the string representation of the pair of X and Y coordinates values represented by the curren...
size_t getStdHash() const
Returns a hash value for the current object.
static Point Truncate(const PointF &point)
Constructs a Point object from the specified PointF object by truncating the PointF object's X and Y ...
int GetHashCode() const
Returns a hash code for the current object.
bool Equals(const Point &point) const
Determines if the current object and the specified object are equal, i.e. represent the same pair of ...
static Point Subtract(const Point &point, const Size &size)
Subtracts the width and height values of the specified Size object from the X and Y coordinates value...
void set_Y(int value)
Sets the value of Y coordinate represented by the current object.
Definition: point.h:51
static const Point Empty
An empty instance of Point class whose X and Y coordinates values are 0.
Definition: point.h:145
friend Point operator-(const Point &point, const Size &size)
Subtracts the width and height values of the specified Size object from the X and Y coordinates value...
int get_X() const
Returns the value of X coordinate represented by the current object.
Definition: point.h:42
void set_X(int value)
Sets the value of X coordinate represented by the current object.
Definition: point.h:48
Point()
Constructs a new Point object and initializes its X and Y coordinates values with 0.
friend bool operator!=(const Point &point1, const Point &point2)
Determines if the specified Point objects are not equal, i.e. represent the distinct pairs of X and Y...
Point(const Size &size)
Constructs a new Point object and initializes its X and Y coordinates values with the values of width...
Represents a pair of integer values that represent width and height of an image. This type should be ...
Definition: size.h:14
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
@ Point
A printer's point (1/72 of an inch).
Definition: db_command.h:9