GraphicState.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/object.h>
5 #include <cstdint>
6 
7 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
8 
9 namespace Aspose
10 {
11 namespace Pdf
12 {
13 namespace Engine
14 {
15 namespace Data
16 {
17 class IPdfDictionary;
18 } // namespace Data
19 } // namespace Engine
20 class Matrix;
21 class Operator;
22 class Resources;
23 namespace Vector
24 {
25 namespace Extraction
26 {
27 class ApsSvgRenderer;
28 } // namespace Extraction
29 class GraphicAppender;
30 class GraphicsAbsorber;
31 class СumulativeGraphicState;
32 } // namespace Vector
33 } // namespace Pdf
34 } // namespace Aspose
35 namespace System
36 {
37 namespace Collections
38 {
39 namespace Generic
40 {
41 template <typename> class List;
42 template <typename, typename> class SortedDictionary;
43 } // namespace Generic
44 } // namespace Collections
45 class String;
46 } // namespace System
47 
48 namespace Aspose {
49 
50 namespace Pdf {
51 
52 namespace Vector {
53 
57 class ASPOSE_PDF_SHARED_CLASS GraphicState : public System::Object
58 {
59  typedef GraphicState ThisType;
60  typedef System::Object BaseType;
61 
62  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
64 
66  friend class Aspose::Pdf::Vector::GraphicAppender;
67  friend class Aspose::Pdf::Vector::Extraction::ApsSvgRenderer;
68 
69 public:
70 
74  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Matrix> get_Matrix() const;
78  ASPOSE_PDF_SHARED_API void set_Matrix(System::SharedPtr<Aspose::Pdf::Matrix> value);
82  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> get_ClipsAndMatrices() const;
87 
88 protected:
89 
90  static const uint8_t None;
91  static const uint8_t SetColorSpace;
92  static const uint8_t SetColorSpaceStroke;
93  static const uint8_t NonStrokeColor;
94  static const uint8_t StrokeColor;
95  static const uint8_t ExtGS;
96  static const uint8_t LineWidth;
97  static const uint8_t LineCap;
98  static const uint8_t LineJoin;
99  static const uint8_t MiterLimit;
100  static const uint8_t LineDashPattern;
101  static const uint8_t Intent;
102  static const uint8_t Flatness;
103  static const uint8_t DictCount;
104 
105  const System::SharedPtr<СumulativeGraphicState>& get_CumulativeState() const;
109  const System::SharedPtr<Aspose::Pdf::Resources>& get_Resources() const;
110 
116 
117  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GraphicState, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Resources> resources));
118 
120 
121  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GraphicState, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Resources> resources, System::SharedPtr<СumulativeGraphicState> сumulativeGraphicState));
135  void ProcessOperator(System::SharedPtr<Operator> op);
136  void ConcatenateMatrix(System::SharedPtr<Operator> op);
137  void AddClipOrMatrixOperator(System::SharedPtr<Operator> op);
138  void SetExtGS(System::SharedPtr<Operator> op);
139  void SetLineWidth(System::SharedPtr<Operator> op);
140  void SetLineCap(System::SharedPtr<Operator> op);
141  void SetLineJoin(System::SharedPtr<Operator> op);
142  void SetMiterLimit(System::SharedPtr<Operator> op);
143  void SetLineDashPattern(System::SharedPtr<Operator> op);
144  void SetIntent(System::SharedPtr<Operator> op);
145  void SetFlatness(System::SharedPtr<Operator> op);
146 
147 private:
148 
154 
156 
158 
159  static uint8_t DetermineOperator(System::SharedPtr<Operator> op);
160  static bool IsStrokeColor(System::SharedPtr<Operator> op);
161  static bool IsNonStrokeColor(System::SharedPtr<Operator> op);
163 
164 };
165 
166 } // namespace Vector
167 } // namespace Pdf
168 } // namespace Aspose
169 
170 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
static const uint8_t ExtGS
Definition: GraphicState.h:95
static const uint8_t SetColorSpace
Definition: GraphicState.h:91
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
static const uint8_t None
Definition: GraphicState.h:90
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:67
static const uint8_t NonStrokeColor
Definition: GraphicState.h:93
static const uint8_t Intent
Definition: GraphicState.h:101
static const uint8_t LineDashPattern
Definition: GraphicState.h:100
static const uint8_t Flatness
Definition: GraphicState.h:102
Represents graphic state of the current GraphicElement.
Definition: GraphicState.h:57
Sorted dictionary type forward declaration.
Definition: GraphicState.h:42
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
static const uint8_t LineCap
Definition: GraphicState.h:97
Definition: AFRelationship.h:4
static const uint8_t DictCount
Definition: GraphicState.h:103
static const uint8_t LineWidth
Definition: GraphicState.h:96
static const uint8_t StrokeColor
Definition: GraphicState.h:94
static const uint8_t SetColorSpaceStroke
Definition: GraphicState.h:92
List forward declaration.
Definition: Artifact.h:74
static const uint8_t MiterLimit
Definition: GraphicState.h:99
static const uint8_t LineJoin
Definition: GraphicState.h:98
Represents an absorber object of graphics elements. Performs graphics search and provides access to s...
Definition: GraphicsAbsorber.h:73
Whole PDF file will be submitted.