Represents graphic state of the current GraphicElement. More...

#include "GraphicState.h"

Inherits System::Object.

Public Member Functions

ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Matrixget_Matrix () const
 Gets the current transformation matrix. More...
 
ASPOSE_PDF_SHARED_API void set_Matrix (System::SharedPtr< Aspose::Pdf::Matrix > value)
 Gets the current transformation matrix. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator > > > get_ClipsAndMatrices () const
 Gets the operators representing clips and concatenation matrices. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Collections::Generic::SortedDictionary< uint8_t, System::SharedPtr< Operator > > > get_ColorsAndStyles () const
 Gets the operators representing colorspaces, colors and line styles. 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 reference 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 int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () 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 (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > get_Colorspaces ()
 
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > get_ExtGstates ()
 
const System::SharedPtr< Aspose::Pdf::Resources > & get_Resources () const
 
 GraphicState (System::SharedPtr< Aspose::Pdf::Resources > resources)
 initialize new graphic state. More...
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (GraphicState, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Resources > resources))
 
System::SharedPtr< GraphicStateClone ()
 Clones this gs. More...
 
void ProcessOperator (System::SharedPtr< Operator > op)
 Processes operator and if this operator is graphic state then adds it to this state. More...
 
void ConcatenateMatrix (System::SharedPtr< Operator > op)
 
void AddClipOrMatrixOperator (System::SharedPtr< Operator > op)
 
void SetExtGS (System::SharedPtr< Operator > op)
 
void SetLineWidth (System::SharedPtr< Operator > op)
 
void SetLineCap (System::SharedPtr< Operator > op)
 
void SetLineJoin (System::SharedPtr< Operator > op)
 
void SetMiterLimit (System::SharedPtr< Operator > op)
 
void SetLineDashPattern (System::SharedPtr< Operator > op)
 
void SetIntent (System::SharedPtr< Operator > op)
 
void SetFlatness (System::SharedPtr< Operator > op)
 

Static Protected Member Functions

static void RestoreGS (System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator >>> operators)
 Deletes all operators from the end of given list until the 'q' operator is encountered. More...
 

Static Protected Attributes

static const uint8_t None
 
static const uint8_t SetColorSpace
 
static const uint8_t SetColorSpaceStroke
 
static const uint8_t NonStrokeColor
 
static const uint8_t StrokeColor
 
static const uint8_t ExtGS
 
static const uint8_t LineWidth
 
static const uint8_t LineCap
 
static const uint8_t LineJoin
 
static const uint8_t MiterLimit
 
static const uint8_t LineDashPattern
 
static const uint8_t Intent
 
static const uint8_t Flatness
 
static const uint8_t DictCount
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. 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 ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Represents graphic state of the current GraphicElement.

Constructor & Destructor Documentation

◆ GraphicState()

Aspose::Pdf::Vector::GraphicState::GraphicState ( System::SharedPtr< Aspose::Pdf::Resources resources)
protected

initialize new graphic state.

Parameters
resourcesResource dictionary

Member Function Documentation

◆ AddClipOrMatrixOperator()

void Aspose::Pdf::Vector::GraphicState::AddClipOrMatrixOperator ( System::SharedPtr< Operator op)
protected

◆ Clone()

System::SharedPtr<GraphicState> Aspose::Pdf::Vector::GraphicState::Clone ( )
protected

Clones this gs.

Returns
Cloned object

◆ ConcatenateMatrix()

void Aspose::Pdf::Vector::GraphicState::ConcatenateMatrix ( System::SharedPtr< Operator op)
protected

◆ get_ClipsAndMatrices()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator> > > Aspose::Pdf::Vector::GraphicState::get_ClipsAndMatrices ( ) const

Gets the operators representing clips and concatenation matrices.

◆ get_ColorsAndStyles()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::SortedDictionary<uint8_t, System::SharedPtr<Operator> > > Aspose::Pdf::Vector::GraphicState::get_ColorsAndStyles ( ) const

Gets the operators representing colorspaces, colors and line styles.

◆ get_Colorspaces()

System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> Aspose::Pdf::Vector::GraphicState::get_Colorspaces ( )
protected

◆ get_ExtGstates()

System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> Aspose::Pdf::Vector::GraphicState::get_ExtGstates ( )
protected

◆ get_Matrix()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Matrix> Aspose::Pdf::Vector::GraphicState::get_Matrix ( ) const

Gets the current transformation matrix.

◆ get_Resources()

const System::SharedPtr<Aspose::Pdf::Resources>& Aspose::Pdf::Vector::GraphicState::get_Resources ( ) const
protected

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

Aspose::Pdf::Vector::GraphicState::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( GraphicState  ,
CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Resources > resources)   
)
protected

◆ ProcessOperator()

void Aspose::Pdf::Vector::GraphicState::ProcessOperator ( System::SharedPtr< Operator op)
protected

Processes operator and if this operator is graphic state then adds it to this state.

Parameters
opOperator

◆ RestoreGS()

static void Aspose::Pdf::Vector::GraphicState::RestoreGS ( System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator >>>  operators)
staticprotected

Deletes all operators from the end of given list until the 'q' operator is encountered.

◆ set_Matrix()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Vector::GraphicState::set_Matrix ( System::SharedPtr< Aspose::Pdf::Matrix value)

Gets the current transformation matrix.

◆ SetExtGS()

void Aspose::Pdf::Vector::GraphicState::SetExtGS ( System::SharedPtr< Operator op)
protected

◆ SetFlatness()

void Aspose::Pdf::Vector::GraphicState::SetFlatness ( System::SharedPtr< Operator op)
protected

◆ SetIntent()

void Aspose::Pdf::Vector::GraphicState::SetIntent ( System::SharedPtr< Operator op)
protected

◆ SetLineCap()

void Aspose::Pdf::Vector::GraphicState::SetLineCap ( System::SharedPtr< Operator op)
protected

◆ SetLineDashPattern()

void Aspose::Pdf::Vector::GraphicState::SetLineDashPattern ( System::SharedPtr< Operator op)
protected

◆ SetLineJoin()

void Aspose::Pdf::Vector::GraphicState::SetLineJoin ( System::SharedPtr< Operator op)
protected

◆ SetLineWidth()

void Aspose::Pdf::Vector::GraphicState::SetLineWidth ( System::SharedPtr< Operator op)
protected

◆ SetMiterLimit()

void Aspose::Pdf::Vector::GraphicState::SetMiterLimit ( System::SharedPtr< Operator op)
protected

Member Data Documentation

◆ DictCount

const uint8_t Aspose::Pdf::Vector::GraphicState::DictCount
staticprotected

◆ ExtGS

const uint8_t Aspose::Pdf::Vector::GraphicState::ExtGS
staticprotected

◆ Flatness

const uint8_t Aspose::Pdf::Vector::GraphicState::Flatness
staticprotected

◆ Intent

const uint8_t Aspose::Pdf::Vector::GraphicState::Intent
staticprotected

◆ LineCap

const uint8_t Aspose::Pdf::Vector::GraphicState::LineCap
staticprotected

◆ LineDashPattern

const uint8_t Aspose::Pdf::Vector::GraphicState::LineDashPattern
staticprotected

◆ LineJoin

const uint8_t Aspose::Pdf::Vector::GraphicState::LineJoin
staticprotected

◆ LineWidth

const uint8_t Aspose::Pdf::Vector::GraphicState::LineWidth
staticprotected

◆ MiterLimit

const uint8_t Aspose::Pdf::Vector::GraphicState::MiterLimit
staticprotected

◆ None

const uint8_t Aspose::Pdf::Vector::GraphicState::None
staticprotected

◆ NonStrokeColor

const uint8_t Aspose::Pdf::Vector::GraphicState::NonStrokeColor
staticprotected

◆ SetColorSpace

const uint8_t Aspose::Pdf::Vector::GraphicState::SetColorSpace
staticprotected

◆ SetColorSpaceStroke

const uint8_t Aspose::Pdf::Vector::GraphicState::SetColorSpaceStroke
staticprotected

◆ StrokeColor

const uint8_t Aspose::Pdf::Vector::GraphicState::StrokeColor
staticprotected