Class represents rectangle. More...

Inherits System::ICloneable.

Public Member Functions

double get_Width ()
 Width of rectangle. More...
 
double get_Height ()
 Height of rectangle. More...
 
double get_LLX ()
 X-coordinate of lower - left corner. More...
 
void set_LLX (double value)
 X-coordinate of lower - left corner. More...
 
double get_LLY ()
 Y - coordinate of lower-left corner. More...
 
void set_LLY (double value)
 Y - coordinate of lower-left corner. More...
 
double get_URX ()
 X - coordinate of upper-right corner. More...
 
void set_URX (double value)
 X - coordinate of upper-right corner. More...
 
double get_URY ()
 Y - coordinate of upper-right corner. More...
 
void set_URY (double value)
 Y - coordinate of upper-right corner. More...
 
bool get_IsTrivial ()
 Checks if rectangle is trivial i.e. has zero size and position. More...
 
bool get_IsEmpty ()
 Checks if rectangle is empty. More...
 
bool get_IsPoint ()
 Checks if rectangle is point i.e. LLX is equal URX and LLY is equal URY. More...
 
 Rectangle (double llx, double lly, double urx, double ury)
 Constructor of Rectangle. More...
 
System::Drawing::Rectangle ToRect ()
 Converts rectangle to instance of System.Drawing.Rectangle. Floating-point positions and size are truncated. More...
 
virtual System::String ToString ()
 Gets rectangle string representation. More...
 
bool Equals (System::SharedPtr< Rectangle > other)
 Check if rectangles are equal i.e. have same position and sizes. More...
 
bool NearEquals (System::SharedPtr< Rectangle > other, double delta)
 Check if rectangles are near equal i.e. have near same (up to delta) position and sizes. More...
 
System::SharedPtr< RectangleIntersect (System::SharedPtr< Rectangle > otherRect)
 Intersects to rectangles. More...
 
System::SharedPtr< RectangleJoin (System::SharedPtr< Rectangle > otherRect)
 Joins rectangles. More...
 
bool IsIntersect (System::SharedPtr< Rectangle > otherRect)
 Determines whether this rectangle intersects with other rectangle. More...
 
bool Contains (System::SharedPtr< Point > point)
 Determinces whether given point is inside of the rectangle. More...
 
System::SharedPtr< PointCenter ()
 Returncs coordinates of center of the rectangle. More...
 
void Rotate (Rotation angle)
 Rotate rectangle by the specified angle. More...
 
void Rotate (int32_t angle)
 Rotate rectangle by the specified angle. More...
 
System::SharedPtr< System::ObjectClone ()
 Clones the Rectangle object. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Static Public Member Functions

static System::SharedPtr< Rectangleget_Trivial ()
 Initializes trivial rectangle i.e. rectangle with zero position and size. More...
 
static System::SharedPtr< RectangleFromRect (System::Drawing::Rectangle src)
 Initializes new rectangle from given instance of System.Drawing.Rectangle. More...
 
static System::SharedPtr< RectangleParse (System::String value)
 Try to parse string and extract from it rectangle components llx, lly, urx, ury. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Static Public Attributes

static System::SharedPtr< RectangleEmpty
 

Protected Member Functions

System::Drawing::RectangleF ToRectangleF ()
 
System::SharedPtr< Engine::Data::PdfArray > ToArray (System::SharedPtr< Engine::Data::ITrailerable > trailerable)
 
void _Intersect (System::SharedPtr< Rectangle > otherRect)
 Intersects rectangles. OBolsete method. Please use Intersect instead. More...
 
bool IsInclude (System::SharedPtr< Rectangle > otherRect, double rotationAngle)
 Checks that this rectangle includes whole another rectangle. I.e. whole another rectangle is inside this rectangle. Difference with IsIntersect method is that IsIntersect will true for partly intersected rectangles but IsInclude will false. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Detailed Description

Class represents rectangle.

Constructor & Destructor Documentation

◆ Rectangle()

Aspose::Pdf::Rectangle::Rectangle ( double  llx,
double  lly,
double  urx,
double  ury 
)

Constructor of Rectangle.

Parameters
llxX of lower left corner.
llyY of lower left corner.
urxX of upper right corner.
uryY of upper right corner.

Member Function Documentation

◆ _Intersect()

void Aspose::Pdf::Rectangle::_Intersect ( System::SharedPtr< Rectangle otherRect)
protected

Intersects rectangles. OBolsete method. Please use Intersect instead.

Parameters
otherRect
Returns

◆ Center()

System::SharedPtr<Point> Aspose::Pdf::Rectangle::Center ( )

Returncs coordinates of center of the rectangle.

Returns
Point which is center of the rectangle.

◆ Clone()

System::SharedPtr<System::Object> Aspose::Pdf::Rectangle::Clone ( )
virtual

Clones the Rectangle object.

Returns
Clone object.

Implements System::ICloneable.

◆ Contains()

bool Aspose::Pdf::Rectangle::Contains ( System::SharedPtr< Point point)

Determinces whether given point is inside of the rectangle.

Parameters
pointPoint to check.
Returns
True if point is inside of the recatngle.

◆ Equals()

bool Aspose::Pdf::Rectangle::Equals ( System::SharedPtr< Rectangle other)

Check if rectangles are equal i.e. have same position and sizes.

Parameters
otherRectangle which will be compared.
Returns
True if rectangles are eqals, false otherwise.

◆ FromRect()

static System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::FromRect ( System::Drawing::Rectangle  src)
static

Initializes new rectangle from given instance of System.Drawing.Rectangle.

Parameters
srcSource rectangle which position and size will be set to new rectangle.
Returns
New rectangle.

◆ get_Height()

double Aspose::Pdf::Rectangle::get_Height ( )

Height of rectangle.

◆ get_IsEmpty()

bool Aspose::Pdf::Rectangle::get_IsEmpty ( )

Checks if rectangle is empty.

◆ get_IsPoint()

bool Aspose::Pdf::Rectangle::get_IsPoint ( )

Checks if rectangle is point i.e. LLX is equal URX and LLY is equal URY.

◆ get_IsTrivial()

bool Aspose::Pdf::Rectangle::get_IsTrivial ( )

Checks if rectangle is trivial i.e. has zero size and position.

◆ get_LLX()

double Aspose::Pdf::Rectangle::get_LLX ( )

X-coordinate of lower - left corner.

◆ get_LLY()

double Aspose::Pdf::Rectangle::get_LLY ( )

Y - coordinate of lower-left corner.

◆ get_Trivial()

static System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::get_Trivial ( )
static

Initializes trivial rectangle i.e. rectangle with zero position and size.

◆ get_URX()

double Aspose::Pdf::Rectangle::get_URX ( )

X - coordinate of upper-right corner.

◆ get_URY()

double Aspose::Pdf::Rectangle::get_URY ( )

Y - coordinate of upper-right corner.

◆ get_Width()

double Aspose::Pdf::Rectangle::get_Width ( )

Width of rectangle.

◆ Intersect()

System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::Intersect ( System::SharedPtr< Rectangle otherRect)

Intersects to rectangles.

Parameters
otherRectRectangle to which this recatangle be intersected.
Returns
Intersection of rectangles; null if rectangles are not intersected.

◆ IsInclude()

bool Aspose::Pdf::Rectangle::IsInclude ( System::SharedPtr< Rectangle otherRect,
double  rotationAngle 
)
protected

Checks that this rectangle includes whole another rectangle. I.e. whole another rectangle is inside this rectangle. Difference with IsIntersect method is that IsIntersect will true for partly intersected rectangles but IsInclude will false.

Parameters
otherRectRectangle for which including is checked.
rotationAngleRotation angle of another rectangle in radians.
Returns
True if this rectangle includes whole specified rectangle. Otherwise false.

◆ IsIntersect()

bool Aspose::Pdf::Rectangle::IsIntersect ( System::SharedPtr< Rectangle otherRect)

Determines whether this rectangle intersects with other rectangle.

Parameters
otherRectIntersection will be tested with specified rectangle.
Returns
True if this rectangle intersects with specified rectangle. Otherwise false.

◆ Join()

System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::Join ( System::SharedPtr< Rectangle otherRect)

Joins rectangles.

Parameters
otherRectRectangle to which this recatangle be joined.
Returns
Described rectangle.

◆ NearEquals()

bool Aspose::Pdf::Rectangle::NearEquals ( System::SharedPtr< Rectangle other,
double  delta 
)

Check if rectangles are near equal i.e. have near same (up to delta) position and sizes.

Parameters
otherRectangle which will be compared.
deltaValue of comparation tollerance.
Returns
True if rectangles are eqals, false otherwise.

◆ Parse()

static System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::Parse ( System::String  value)
static

Try to parse string and extract from it rectangle components llx, lly, urx, ury.

Parameters
valueString to parse.
Returns
Rectangle object.

◆ Rotate() [1/2]

void Aspose::Pdf::Rectangle::Rotate ( Rotation  angle)

Rotate rectangle by the specified angle.

Parameters
angleAngle of rotation. Member of Rotation enumeration.

◆ Rotate() [2/2]

void Aspose::Pdf::Rectangle::Rotate ( int32_t  angle)

Rotate rectangle by the specified angle.

Parameters
angleAngle of rotation in degrees between 0 and 360.

◆ set_LLX()

void Aspose::Pdf::Rectangle::set_LLX ( double  value)

X-coordinate of lower - left corner.

◆ set_LLY()

void Aspose::Pdf::Rectangle::set_LLY ( double  value)

Y - coordinate of lower-left corner.

◆ set_URX()

void Aspose::Pdf::Rectangle::set_URX ( double  value)

X - coordinate of upper-right corner.

◆ set_URY()

void Aspose::Pdf::Rectangle::set_URY ( double  value)

Y - coordinate of upper-right corner.

◆ ToArray()

System::SharedPtr<Engine::Data::PdfArray> Aspose::Pdf::Rectangle::ToArray ( System::SharedPtr< Engine::Data::ITrailerable >  trailerable)
protected

◆ ToRect()

System::Drawing::Rectangle Aspose::Pdf::Rectangle::ToRect ( )

Converts rectangle to instance of System.Drawing.Rectangle. Floating-point positions and size are truncated.

Returns
Result of conversion.

◆ ToRectangleF()

System::Drawing::RectangleF Aspose::Pdf::Rectangle::ToRectangleF ( )
protected

◆ ToString()

virtual System::String Aspose::Pdf::Rectangle::ToString ( )
virtual

Gets rectangle string representation.

Returns
String has format llx,lly,urx,ury.

Reimplemented from System::Object.

Member Data Documentation

◆ Empty

System::SharedPtr<Rectangle> Aspose::Pdf::Rectangle::Empty
static