Class represents transformation matrix. More...

Inherits System::Object.

Public Member Functions

double get_A ()
 A member of the transformation matrix. More...
 
void set_A (double value)
 A member of the transformation matrix. More...
 
double get_B ()
 B member of the transformation matrix. More...
 
void set_B (double value)
 B member of the transformation matrix. More...
 
double get_C ()
 C member of the transformation matrix. More...
 
void set_C (double value)
 C member of the transformation matrix. More...
 
double get_D ()
 D member of the transformation matrix. More...
 
void set_D (double value)
 D member of the transformation matrix. More...
 
double get_E ()
 E member of the transformation matrix. More...
 
void set_E (double value)
 E member of the transformation matrix. More...
 
double get_F ()
 F member of the transformation matrix. More...
 
void set_F (double value)
 F member of the transformation matrix. More...
 
double get_G ()
 G member of the transformation matrix. More...
 
void set_G (double value)
 G member of the transformation matrix. More...
 
double get_H ()
 H member of the transformation matrix. More...
 
void set_H (double value)
 H member of the transformation matrix. More...
 
double get_I ()
 I member of the transformation matrix. More...
 
void set_I (double value)
 I member of the transformation matrix. More...
 
double get_Tx ()
 Tx member of the transformation matrix. More...
 
void set_Tx (double value)
 Tx member of the transformation matrix. More...
 
double get_Ty ()
 Ty member of the transformation matrix. More...
 
void set_Ty (double value)
 Ty member of the transformation matrix. More...
 
double get_Tz ()
 Tz member of the transformation matrix. More...
 
void set_Tz (double value)
 Tz member of the transformation matrix. More...
 
 Matrix3D ()
 Constructor creates stanrard 1 to 1 matrix: [ A B C D E F G H I Tx Ty Tz] = [ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0 , 0] More...
 
 Matrix3D (System::ArrayPtr< double > matrix3DArray)
 Constructor accepts a matrix with following array representation: [ A B C D E F G H I Tx Ty Tz] More...
 
 Matrix3D (System::SharedPtr< Matrix3D > matrix)
 Constructor accepts a matrix to create a copy More...
 
virtual System::String ToString ()
 Returns text reporesentation of the matrix. More...
 
virtual bool Equals (System::SharedPtr< System::Object > obj)
 Compares matrix agains other object. More...
 
System::SharedPtr< Matrix3DAdd (System::SharedPtr< Matrix3D > other)
 Multiplies the matrix by other matrix. More...
 
 Matrix3D (double a, double b, double c, double d, double e, double f, double g, double h, double i, double tx, double ty, double tz)
 Transforms point using this matrix. More...
 
virtual int32_t GetHashCode () const
 Calculates reverse matrix. 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 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 double GetAngle (Rotation rotation)
 Creates matrix for given rotation angle. 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...
 

Protected Member Functions

System::SharedPtr< Engine::Data::IPdfArray > getMatrix3D (System::SharedPtr< Engine::Data::ITrailerable > trailer)
 Translates matrix into PDF array obect. More...
 
System::SharedPtr< Engine::Data::IPdfArray > ToPdfArray (System::SharedPtr< Engine::Data::ITrailerable > trailerable)
 
 Matrix3D (System::SharedPtr< Engine::Data::IPdfArray > data)
 

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 transformation matrix.

Constructor & Destructor Documentation

◆ Matrix3D() [1/5]

Aspose::Pdf::Matrix3D::Matrix3D ( )

Constructor creates stanrard 1 to 1 matrix: [ A B C D E F G H I Tx Ty Tz] = [ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0 , 0]

Matrix3D m = new Matrix3D();

◆ Matrix3D() [2/5]

Aspose::Pdf::Matrix3D::Matrix3D ( System::ArrayPtr< double >  matrix3DArray)

Constructor accepts a matrix with following array representation: [ A B C D E F G H I Tx Ty Tz]

Parameters
matrix3DArrayMatrix data array.
double[] c = new double[] { 1, 0, 0, 1, 10, 20, 1, 0, 0, 17, 40, 13 };
Matrix3D m = new Matrix3D(c);

◆ Matrix3D() [3/5]

Aspose::Pdf::Matrix3D::Matrix3D ( System::SharedPtr< Matrix3D matrix)

Constructor accepts a matrix to create a copy

Parameters
matrixMatrix3D object.

◆ Matrix3D() [4/5]

Aspose::Pdf::Matrix3D::Matrix3D ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f,
double  g,
double  h,
double  i,
double  tx,
double  ty,
double  tz 
)

Transforms point using this matrix.

Parameters
pPoint which will be transformed.
Returns
Transformation result.
Matrix m = new Matrix(new double[] { 1, 0, 0, 1, 10, 20 } );
Point p = new Point(5, 5);
Point p1 = m.Transform(p);

Transformes rectangle. If angle is not 90 * N degrees then bounding rectangle is returned.

Parameters
rectRectangle to be transformed.
Returns
Transformed rectangle.
Matrix m = new Matrix(new double[] { 1, 0, 0, 1, 10, 20 } );
Rectangle r = new Rectangle(0, 0, 100, 100);
Rectangle r1 = m.Transform(r1);

Initializes transformation matrix with specified coefficients.

Parameters
aA matrix value.
bB matrix value.
cC matrix value.
dD matrix value.
eE matrix value.
fF matrix value.
Matrix m = new Matrix(1, 0, 0, 1, 3, 3);

◆ Matrix3D() [5/5]

Aspose::Pdf::Matrix3D::Matrix3D ( System::SharedPtr< Engine::Data::IPdfArray >  data)
protected

Member Function Documentation

◆ Add()

System::SharedPtr<Matrix3D> Aspose::Pdf::Matrix3D::Add ( System::SharedPtr< Matrix3D other)

Multiplies the matrix by other matrix.

Parameters
otherMultiplier matrix.
Returns
Result of multiplication.
Matrix a = new Matrix(new double[] { 1, 0, 0, 1, 10, 20 });
Matrix b = new Matrix(new double[] { 0, -1, 1, 0, 0, 0 } );
Matrix c= a.Multiply(b);

Adds matrix to other matrix.

Parameters
otherMatrix to be added.
Returns
Result of matrix add.

◆ Equals()

virtual bool Aspose::Pdf::Matrix3D::Equals ( System::SharedPtr< System::Object obj)
virtual

Compares matrix agains other object.

Parameters
objObject to compare.
Returns
Returns true is other object is Matrix3D and all matrix members are equal to corresponding members of the matrix

◆ get_A()

double Aspose::Pdf::Matrix3D::get_A ( )

A member of the transformation matrix.

◆ get_B()

double Aspose::Pdf::Matrix3D::get_B ( )

B member of the transformation matrix.

◆ get_C()

double Aspose::Pdf::Matrix3D::get_C ( )

C member of the transformation matrix.

◆ get_D()

double Aspose::Pdf::Matrix3D::get_D ( )

D member of the transformation matrix.

◆ get_E()

double Aspose::Pdf::Matrix3D::get_E ( )

E member of the transformation matrix.

◆ get_F()

double Aspose::Pdf::Matrix3D::get_F ( )

F member of the transformation matrix.

◆ get_G()

double Aspose::Pdf::Matrix3D::get_G ( )

G member of the transformation matrix.

◆ get_H()

double Aspose::Pdf::Matrix3D::get_H ( )

H member of the transformation matrix.

◆ get_I()

double Aspose::Pdf::Matrix3D::get_I ( )

I member of the transformation matrix.

◆ get_Tx()

double Aspose::Pdf::Matrix3D::get_Tx ( )

Tx member of the transformation matrix.

◆ get_Ty()

double Aspose::Pdf::Matrix3D::get_Ty ( )

Ty member of the transformation matrix.

◆ get_Tz()

double Aspose::Pdf::Matrix3D::get_Tz ( )

Tz member of the transformation matrix.

◆ GetAngle()

static double Aspose::Pdf::Matrix3D::GetAngle ( Rotation  rotation)
static

Creates matrix for given rotation angle.

Parameters
alphaRotation angle in radians.
Returns
Transformation matrix.
Matrix m = Matrix.Rotation(Math.PI / 2);

Creates matrix for given rotation angle.

Parameters
alphaSkew x angle in radians.
betaSkew y angle in radians.
Returns
Transformation matrix.
Matrix m = Matrix.Skew(Math.PI / 2, Math.PI / 2);

Creates matrix for given scale.

Parameters
xScale x.
yScale y.
Returns
Transformation matrix.
Matrix m = Matrix.Scale(x, y);

Transaltes rotation into angle (degrees)

Parameters
rotationRotation value.
double angle = Matrix.GetAngle(Rotation.on90);
Matrix m = Matrix.Rotation(angle);
Returns
Angle value.

◆ GetHashCode()

virtual int32_t Aspose::Pdf::Matrix3D::GetHashCode ( ) const
virtual

Calculates reverse matrix.

Returns
Reverse matrix.
Matrix m = Matrix.Rotation(Math.PI / 2);
Matrix m1 = m.Reverse();

Hash-code for object.

Returns
Hash-code.

Reimplemented from System::Object.

◆ getMatrix3D()

System::SharedPtr<Engine::Data::IPdfArray> Aspose::Pdf::Matrix3D::getMatrix3D ( System::SharedPtr< Engine::Data::ITrailerable >  trailer)
protected

Translates matrix into PDF array obect.

Parameters
trailerTrailerable object
Returns
Result of converting

◆ set_A()

void Aspose::Pdf::Matrix3D::set_A ( double  value)

A member of the transformation matrix.

◆ set_B()

void Aspose::Pdf::Matrix3D::set_B ( double  value)

B member of the transformation matrix.

◆ set_C()

void Aspose::Pdf::Matrix3D::set_C ( double  value)

C member of the transformation matrix.

◆ set_D()

void Aspose::Pdf::Matrix3D::set_D ( double  value)

D member of the transformation matrix.

◆ set_E()

void Aspose::Pdf::Matrix3D::set_E ( double  value)

E member of the transformation matrix.

◆ set_F()

void Aspose::Pdf::Matrix3D::set_F ( double  value)

F member of the transformation matrix.

◆ set_G()

void Aspose::Pdf::Matrix3D::set_G ( double  value)

G member of the transformation matrix.

◆ set_H()

void Aspose::Pdf::Matrix3D::set_H ( double  value)

H member of the transformation matrix.

◆ set_I()

void Aspose::Pdf::Matrix3D::set_I ( double  value)

I member of the transformation matrix.

◆ set_Tx()

void Aspose::Pdf::Matrix3D::set_Tx ( double  value)

Tx member of the transformation matrix.

◆ set_Ty()

void Aspose::Pdf::Matrix3D::set_Ty ( double  value)

Ty member of the transformation matrix.

◆ set_Tz()

void Aspose::Pdf::Matrix3D::set_Tz ( double  value)

Tz member of the transformation matrix.

◆ ToPdfArray()

System::SharedPtr<Engine::Data::IPdfArray> Aspose::Pdf::Matrix3D::ToPdfArray ( System::SharedPtr< Engine::Data::ITrailerable >  trailerable)
protected

◆ ToString()

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

Returns text reporesentation of the matrix.

Returns
String representation for the matrix

Reimplemented from System::Object.