wxMaxima
Loading...
Searching...
No Matches
pdfgraphics.h
Go to the documentation of this file.
1
2// Name: pdfgraphics.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2006-08-24
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_GRAPHICS_H_
13#define _PDF_GRAPHICS_H_
14
15// wxWidgets headers
16
17// wxPdfDocument headers
18#include "wx/pdfdocdef.h"
19
20// TODO: include Header for wxPdfBlendMode
21
22class WXDLLIMPEXP_FWD_PDFDOC wxPdfShape;
23
26class WXDLLIMPEXP_PDFDOC wxPdfExtGState
27{
28public:
30
35 wxPdfExtGState(double lineAlpha, double fillAlpha, wxPdfBlendMode blendMode);
36
38 virtual ~wxPdfExtGState();
39
41
44 void SetObjIndex(int n) { m_n = n; }
45
47
50 int GetObjIndex() { return m_n; }
51
53
56 double GetLineAlpha() const { return m_lineAlpha; }
57
59
62 double GetFillAlpha() const { return m_fillAlpha; }
63
65
68 wxPdfBlendMode GetBlendMode() const { return m_blendMode; };
69
70private:
71 int m_n;
72 double m_lineAlpha;
73 double m_fillAlpha;
74 wxPdfBlendMode m_blendMode;
75};
76
78class WXDLLIMPEXP_PDFDOC wxPdfFlatPath
79{
80public:
82
87 wxPdfFlatPath(const wxPdfShape* shape, double flatness = 1, int limit = 10);
88
90 virtual ~wxPdfFlatPath();
91
93 void InitIter();
94
96 void FetchSegment();
97
99 void Next();
100
102
106 int CurrentSegment(double coords[]);
107
109 void SubdivideCubic();
110
112
115 bool IsDone() { return m_done; }
116
118
121 double MeasurePathLength();
122
123private:
124 const wxPdfShape* m_shape;
125 double m_flatnessSq;
126 int m_recursionLimit;
127 int m_stackMaxSize;
128 int m_stackSize;
129 double* m_stack;
130 int* m_recLevel;
131 double m_scratch[6];
132 int m_iterType;
133 int m_iterPoints;
134 int m_srcSegType;
135 double m_srcPosX;
136 double m_srcPosY;
137 bool m_done;
138};
139
140#endif
Class representing ExtGState. (For internal use only)
Definition: pdfgraphics.h:27
void SetObjIndex(int n)
Set ExtGState object index.
Definition: pdfgraphics.h:44
double GetFillAlpha() const
Get the alpha value for filling operations.
Definition: pdfgraphics.h:62
int GetObjIndex()
Get ExtGState object index.
Definition: pdfgraphics.h:50
wxPdfBlendMode GetBlendMode() const
Get the blend mode.
Definition: pdfgraphics.h:68
double GetLineAlpha() const
Get the alpha value for drawing operations.
Definition: pdfgraphics.h:56
Class representing a flattened path.
Definition: pdfgraphics.h:79
bool IsDone()
Check whether path iterator is done.
Definition: pdfgraphics.h:115
Class representing a shape consisting of line and curve segments.
Definition: pdfshape.h:34
Compile time switches for the wxPdfDocument component.
wxPdfBlendMode
Blend modes.
Definition: pdfproperties.h:274