Aspose::Pdf::Engine::Presentation::Graphics::SizeF Class Reference

Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle. More...

Inherits System::Object.

Public Member Functions

bool get_IsEmpty ()
 Gets a value indicating whether this Aspose::Pdf::Engine::Presentation::Graphics::SizeF has zero width and height. More...
 
float get_Width () const
 Gets the horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
void set_Width (float value)
 Sets the horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
float get_Height () const
 Gets the vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
void set_Height (float value)
 Sets the vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
 SizeF (SizeF const &size)
 Initializes a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the specified Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
 SizeF (PointF point)
 Initializes a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the specified Aspose::Pdf::Engine::Presentation::Graphics::PointF. More...
 
 SizeF (float width, float height)
 Initializes a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the specified dimensions. More...
 
PointF ToPointF ()
 Converts a Aspose::Pdf::Engine::Presentation::Graphics::SizeF to a Aspose::Pdf::Engine::Presentation::Graphics::PointF. More...
 
Size ToSize ()
 Converts a Aspose::Pdf::Engine::Presentation::Graphics::SizeF to a Aspose::Pdf::Engine::Presentation::Graphics::Size structure with truncated size values. More...
 
virtual int32_t GetHashCode () const
 Returns a hash code for this Aspose::Pdf::Engine::Presentation::Graphics::Size structure. More...
 
virtual System::String ToString () const
 Creates a human-readable string that represents this Aspose::Pdf::Engine::Presentation::Graphics::SizeF. More...
 
 SizeF ()
 
- 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 String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. 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 SizeF get_Empty ()
 Gets a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure that has Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Width and Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Height values set to zero. More...
 
static PointF to_PointF (SizeF size)
 
static SizeF Add (SizeF size1, SizeF size2)
 Adds the width and height of one Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure to the width and height of another Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure. More...
 
static SizeF Subtract (SizeF size1, SizeF size2)
 Subtracts the width and height of one Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the width and height of another Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure. 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...
 

Friends

ASPOSE_PDF_SHARED_API SizeF operator+ (SizeF size1, SizeF size2)
 
ASPOSE_PDF_SHARED_API SizeF operator- (SizeF size1, SizeF size2)
 
ASPOSE_PDF_SHARED_API bool operator== (SizeF const &size1, SizeF const &size2)
 
ASPOSE_PDF_SHARED_API bool operator!= (SizeF const &size1, SizeF const &size2)
 

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

Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.

Constructor & Destructor Documentation

◆ SizeF() [1/4]

Aspose::Pdf::Engine::Presentation::Graphics::SizeF::SizeF ( SizeF const &  size)

◆ SizeF() [2/4]

Aspose::Pdf::Engine::Presentation::Graphics::SizeF::SizeF ( PointF  point)

◆ SizeF() [3/4]

Aspose::Pdf::Engine::Presentation::Graphics::SizeF::SizeF ( float  width,
float  height 
)

Initializes a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the specified dimensions.

Parameters
widthThe width component of the new Aspose::Pdf::Engine::Presentation::Graphics::SizeF.
heightThe height component of the new Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

◆ SizeF() [4/4]

Aspose::Pdf::Engine::Presentation::Graphics::SizeF::SizeF ( )

Member Function Documentation

◆ Add()

static SizeF Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Add ( SizeF  size1,
SizeF  size2 
)
static

Adds the width and height of one Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure to the width and height of another Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure.

Parameters
size1The first Aspose::Pdf::Engine::Presentation::Graphics::SizeF to add.
size2The second Aspose::Pdf::Engine::Presentation::Graphics::SizeF to add.
Returns
A Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure that is the result of the addition operation.

◆ get_Empty()

static SizeF Aspose::Pdf::Engine::Presentation::Graphics::SizeF::get_Empty ( )
static

Gets a new instance of the Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure that has Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Width and Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Height values set to zero.

◆ get_Height()

float Aspose::Pdf::Engine::Presentation::Graphics::SizeF::get_Height ( ) const

Gets the vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Returns
The vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF, typically measured in pixels.

◆ get_IsEmpty()

bool Aspose::Pdf::Engine::Presentation::Graphics::SizeF::get_IsEmpty ( )

Gets a value indicating whether this Aspose::Pdf::Engine::Presentation::Graphics::SizeF has zero width and height.

Returns
This property returns true when this Aspose::Pdf::Engine::Presentation::Graphics::SizeF has both a width and height of zero; otherwise, false.

◆ get_Width()

float Aspose::Pdf::Engine::Presentation::Graphics::SizeF::get_Width ( ) const

Gets the horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Returns
The horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF, typically measured in pixels.

◆ GetHashCode()

virtual int32_t Aspose::Pdf::Engine::Presentation::Graphics::SizeF::GetHashCode ( ) const
virtual

Returns a hash code for this Aspose::Pdf::Engine::Presentation::Graphics::Size structure.

Returns
An integer value that specifies a hash value for this Aspose::Pdf::Engine::Presentation::Graphics::Size structure.

Reimplemented from System::Object.

◆ set_Height()

void Aspose::Pdf::Engine::Presentation::Graphics::SizeF::set_Height ( float  value)

Sets the vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Parameters
valueThe vertical component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF, typically measured in pixels.

◆ set_Width()

void Aspose::Pdf::Engine::Presentation::Graphics::SizeF::set_Width ( float  value)

Sets the horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Parameters
valueThe horizontal component of this Aspose::Pdf::Engine::Presentation::Graphics::SizeF, typically measured in pixels.

◆ Subtract()

static SizeF Aspose::Pdf::Engine::Presentation::Graphics::SizeF::Subtract ( SizeF  size1,
SizeF  size2 
)
static

Subtracts the width and height of one Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure from the width and height of another Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure.

Parameters
size1The Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure on the left side of the subtraction operator.
size2The Aspose::Pdf::Engine::Presentation::Graphics::SizeF structure on the right side of the subtraction operator.
Returns
The Aspose::Pdf::Engine::Presentation::Graphics::SizeF that is a result of the subtraction operation.

◆ to_PointF()

static PointF Aspose::Pdf::Engine::Presentation::Graphics::SizeF::to_PointF ( SizeF  size)
static

◆ ToPointF()

PointF Aspose::Pdf::Engine::Presentation::Graphics::SizeF::ToPointF ( )

◆ ToSize()

Size Aspose::Pdf::Engine::Presentation::Graphics::SizeF::ToSize ( )

◆ ToString()

virtual System::String Aspose::Pdf::Engine::Presentation::Graphics::SizeF::ToString ( ) const
virtual

Creates a human-readable string that represents this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Returns
A string that represents this Aspose::Pdf::Engine::Presentation::Graphics::SizeF.

Friends And Related Function Documentation

◆ operator!=

ASPOSE_PDF_SHARED_API bool operator!= ( SizeF const &  size1,
SizeF const &  size2 
)
friend

◆ operator+

ASPOSE_PDF_SHARED_API SizeF operator+ ( SizeF  size1,
SizeF  size2 
)
friend

◆ operator-

ASPOSE_PDF_SHARED_API SizeF operator- ( SizeF  size1,
SizeF  size2 
)
friend

◆ operator==

ASPOSE_PDF_SHARED_API bool operator== ( SizeF const &  size1,
SizeF const &  size2 
)
friend