Asposecpplib

Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane. 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...

Public Member Functions

ASPOSECPP_SHARED_API Point ()
 Constructs a new Point object and initializes its X and Y coordinates values with 0. More...
 
ASPOSECPP_SHARED_API Point (int x, int y)
 Constructs a new Point object and initializes it with the specified values. More...
 
ASPOSECPP_SHARED_API Point (const Size &size)
 Constructs a new Point object and initializes its X and Y coordinates values with the values of width and height of the specifide SizeF object correspondingly. More...
 
ASPOSECPP_SHARED_API Point (int dw)
 Constructs a new Point object and initializes its X coordinate value with a value formed by high 16 bits of the specified 32-bit integer and its Y coordinate value with a vale formed by low 16 bits of the specified 32-bit integer value value. More...
 
bool get_IsEmpty () const
 Determines if both X and Y coordinates values are equal to 0. More...
 
int get_X () const
 Returns the value of X coordinate represented by the current object. More...
 
int get_Y () const
 Returns the value of Y coordinate represented by the current object. More...
 
void set_X (int value)
 Sets the value of X coordinate represented by the current object. More...
 
void set_Y (int value)
 Sets the value of Y coordinate represented by the current object. More...
 
ASPOSECPP_SHARED_API bool Equals (const Point &point) const
 Determines if the current object and the specified object are equal, i.e. represent the same pair of X and Y coordinates values. More...
 
ASPOSECPP_SHARED_API int GetHashCode () const
 Returns a hash code for the current object. More...
 
ASPOSECPP_SHARED_API String ToString () const
 Returns the string representation of the pair of X and Y coordinates values represented by the current object. More...
 
void Offset (int dx, int dy)
 Offsets the X and Y coordinates value represented by the current object by the specified values. More...
 
void Offset (Point point)
 Offsets the X and Y coordinates represented by the current object by the values of X and Y coordinates represented by the specified Point object correspondingly. More...
 
ASPOSECPP_SHARED_API operator PointF () const
 Constructs an instance of PointF object and initializes it with X and Y coordinates values of the current Point object. More...
 
ASPOSECPP_SHARED_API operator Size () const
 Constructs an instance of Size object and initializes its width and height values with X and Y coordinates values represented by the current object correspondingly. More...
 
bool IsNull () const
 Always returns false. More...
 
size_t getStdHash () const
 Returns a hash value for the current object. More...
 

Static Public Member Functions

static ASPOSECPP_SHARED_API 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 the specified Point object correspondingly. More...
 
static ASPOSECPP_SHARED_API 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 values of the specified Point object correspondingly. More...
 
static ASPOSECPP_SHARED_API Point Ceiling (const PointF &point)
 Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y coordinates values to the next higher integer values. More...
 
static ASPOSECPP_SHARED_API Point Truncate (const PointF &point)
 Constructs a Point object from the specified PointF object by truncating the PointF object's X and Y coordinates values to the next lower integer values. More...
 
static ASPOSECPP_SHARED_API Point Round (const PointF &point)
 Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y coordinates values to the nearest integer values. More...
 

Static Public Attributes

static const ASPOSECPP_SHARED_API Point Empty
 An empty instance of Point class whose X and Y coordinates values are 0. More...
 

Friends

ASPOSECPP_SHARED_API 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 the specified Point object correspondingly. More...
 
ASPOSECPP_SHARED_API 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 values of the specified Point object correspondingly. More...
 
ASPOSECPP_SHARED_API 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 coordinates values. More...
 
ASPOSECPP_SHARED_API 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 coordinates values. More...
 
ASPOSECPP_SHARED_API bool operator< (const Point &point1, const Point &point2)
 Always throws InvalidOperationException. More...
 

Detailed Description

Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane. 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.

Constructor & Destructor Documentation

◆ Point() [1/4]

ASPOSECPP_SHARED_API System::Drawing::Point::Point ( )

Constructs a new Point object and initializes its X and Y coordinates values with 0.

◆ Point() [2/4]

ASPOSECPP_SHARED_API System::Drawing::Point::Point ( int  x,
int  y 
)

Constructs a new Point object and initializes it with the specified values.

Parameters
xThe value of X coordinate
yThe value of Y coordinate

◆ Point() [3/4]

ASPOSECPP_SHARED_API System::Drawing::Point::Point ( const Size size)

Constructs a new Point object and initializes its X and Y coordinates values with the values of width and height of the specifide SizeF object correspondingly.

Parameters
sizeA SizeF object whose width and height values are used to initialize X and Y coordinates values of the Point object being created

◆ Point() [4/4]

ASPOSECPP_SHARED_API System::Drawing::Point::Point ( int  dw)

Constructs a new Point object and initializes its X coordinate value with a value formed by high 16 bits of the specified 32-bit integer and its Y coordinate value with a vale formed by low 16 bits of the specified 32-bit integer value value.

Parameters
dwThe 32-bit integer value whose high 16 bits specify the X coordinate value and low 16 bits specify the Y coordinate value of the object being created

Member Function Documentation

◆ Add()

static ASPOSECPP_SHARED_API Point System::Drawing::Point::Add ( const Point point,
const Size size 
)
static

Adds the width and height values of the specified Size object to the X and Y coordinates values of the specified Point object correspondingly.

Parameters
pointThe point to translate
sizeThe Size object that specifies the values to add to the coordinates values of the point
Returns
A new Point object whose X coordinate value is equal to the sum of X coordinate value of point and the width value of size and Y coordinate value is equal to the sum of Y coordinate value of point and the height value of size

◆ Ceiling()

static ASPOSECPP_SHARED_API Point System::Drawing::Point::Ceiling ( const PointF point)
static

Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y coordinates values to the next higher integer values.

Parameters
pointThe PointF object to construct a Point object from
Returns
A Point object constructed from point

◆ Equals()

ASPOSECPP_SHARED_API bool System::Drawing::Point::Equals ( const Point point) const

Determines if the current object and the specified object are equal, i.e. represent the same pair of X and Y coordinates values.

Parameters
pointPoint The object to compare the current object with
Returns
True if the objects are equal, otherwise - false

◆ get_IsEmpty()

bool System::Drawing::Point::get_IsEmpty ( ) const
inline

Determines if both X and Y coordinates values are equal to 0.

Returns
True if both X and Y coordinates represented by the current object are 0; otherwise - false

◆ get_X()

int System::Drawing::Point::get_X ( ) const
inline

Returns the value of X coordinate represented by the current object.

◆ get_Y()

int System::Drawing::Point::get_Y ( ) const
inline

Returns the value of Y coordinate represented by the current object.

◆ GetHashCode()

ASPOSECPP_SHARED_API int System::Drawing::Point::GetHashCode ( ) const

Returns a hash code for the current object.

◆ getStdHash()

size_t System::Drawing::Point::getStdHash ( ) const

Returns a hash value for the current object.

◆ IsNull()

bool System::Drawing::Point::IsNull ( ) const
inline

Always returns false.

◆ Offset() [1/2]

void System::Drawing::Point::Offset ( int  dx,
int  dy 
)
inline

Offsets the X and Y coordinates value represented by the current object by the specified values.

Parameters
dxThe value to offset the X coordinate value by
dyThe value to offset the Y coordinate value by

◆ Offset() [2/2]

void System::Drawing::Point::Offset ( Point  point)
inline

Offsets the X and Y coordinates represented by the current object by the values of X and Y coordinates represented by the specified Point object correspondingly.

Parameters
pointThe Point object specifying the values to offset the X and Y coordinates by

◆ operator PointF()

ASPOSECPP_SHARED_API System::Drawing::Point::operator PointF ( ) const

Constructs an instance of PointF object and initializes it with X and Y coordinates values of the current Point object.

◆ operator Size()

ASPOSECPP_SHARED_API System::Drawing::Point::operator Size ( ) const

Constructs an instance of Size object and initializes its width and height values with X and Y coordinates values represented by the current object correspondingly.

◆ Round()

static ASPOSECPP_SHARED_API Point System::Drawing::Point::Round ( const PointF point)
static

Constructs a Point object from the specified PointF object by rounding the PointF object's X and Y coordinates values to the nearest integer values.

Parameters
pointThe PointF object to construct a Point object from
Returns
A Point object constructed from point

◆ set_X()

void System::Drawing::Point::set_X ( int  value)
inline

Sets the value of X coordinate represented by the current object.

Parameters
valueThe value to set

◆ set_Y()

void System::Drawing::Point::set_Y ( int  value)
inline

Sets the value of Y coordinate represented by the current object.

Parameters
valueThe value to set

◆ Subtract()

static ASPOSECPP_SHARED_API Point System::Drawing::Point::Subtract ( const Point point,
const Size size 
)
static

Subtracts the width and height values of the specified Size object from the X and Y coordinates values of the specified Point object correspondingly.

Parameters
pointThe point to translate
sizeThe Size object that specifies the values to subtract from the coordinates values of the point
Returns
A new Point object whose X coordinate value is equal to the result of subtraction of the width value of size from the X coordinate value of point and Y coordinate value is equal to the result of subtraction of the height value of size from the Y coordinate value of point

◆ ToString()

ASPOSECPP_SHARED_API String System::Drawing::Point::ToString ( ) const

Returns the string representation of the pair of X and Y coordinates values represented by the current object.

◆ Truncate()

static ASPOSECPP_SHARED_API Point System::Drawing::Point::Truncate ( const PointF point)
static

Constructs a Point object from the specified PointF object by truncating the PointF object's X and Y coordinates values to the next lower integer values.

Parameters
pointThe PointF object to construct a Point object from
Returns
A Point object constructed from point

Friends And Related Function Documentation

◆ operator!=

ASPOSECPP_SHARED_API bool operator!= ( const Point point1,
const Point point2 
)
friend

Determines if the specified Point objects are not equal, i.e. represent the distinct pairs of X and Y coordinates values.

Parameters
point1The first comparand
point2The second comparand
Returns
True if the objects are not equal, otherwise - false

◆ operator+

ASPOSECPP_SHARED_API Point operator+ ( const Point point,
const Size size 
)
friend

Adds the width and height values of the specified Size object to the X and Y coordinates values of the specified Point object correspondingly.

Parameters
pointThe point to translate
sizeThe Size object that specifies the values to add to the coordinates values of the point
Returns
A new Point object whose X coordinate value is equal to the sum of X coordinate value of point and the width value of size and Y coordinate value is equal to the sum of Y coordinate value of point and the height value of size

◆ operator-

ASPOSECPP_SHARED_API Point operator- ( const Point point,
const Size size 
)
friend

Subtracts the width and height values of the specified Size object from the X and Y coordinates values of the specified Point object correspondingly.

Parameters
pointThe point to translate
sizeThe Size object that specifies the values to subtract from the coordinates values of the point
Returns
A new Point object whose X coordinate value is equal to the result of subtraction of the width value of size from the X coordinate value of point and Y coordinate value is equal to the result of subtraction of the height value of size from the Y coordinate value of point

◆ operator

ASPOSECPP_SHARED_API bool operator< ( const Point point1,
const Point point2 
)
friend

Always throws InvalidOperationException.

Exceptions
InvalidOperationExceptionAlways

◆ operator==

ASPOSECPP_SHARED_API bool operator== ( const Point point1,
const Point point2 
)
friend

Determines if the specified Point objects are equal, i.e. represent the same pair of X and Y coordinates values.

Parameters
point1The first comparand
point2The second comparand
Returns
True if the objects are equal, otherwise - false

Member Data Documentation

◆ Empty

const ASPOSECPP_SHARED_API Point System::Drawing::Point::Empty
static

An empty instance of Point class whose X and Y coordinates values are 0.