wxMaxima
Loading...
Searching...
No Matches
pdfpattern.h
Go to the documentation of this file.
1
2// Name: pdfpattern.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-06-18
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_PATTERN_H_
13#define _PDF_PATTERN_H_
14
15// wxWidgets headers
16#include <wx/graphics.h>
17#include <wx/string.h>
18
19// wxPdfDocument headers
20#include "wx/pdfdocdef.h"
21#include "wx/pdfproperties.h"
22
23class WXDLLIMPEXP_FWD_PDFDOC wxPdfImage;
24
26class WXDLLIMPEXP_PDFDOC wxPdfPattern
27{
28public:
30
35 wxPdfPattern(int index, double width, double height);
36
38
44 wxPdfPattern(int index, double width, double height, int templateId);
45
47
55 wxPdfPattern(int index, double width, double height, wxPdfPatternStyle patternStyle, const wxColour& drawColour, const wxColour& fillColour = wxColour());
56
58
67 wxPdfPattern(int index, double x1, double y1, double x2, double y2, const wxGraphicsGradientStops& stops, const wxAffineMatrix2D& matrix);
68
70
81 wxPdfPattern(int index, double startX, double startY, double startRadius, double endX, double endY, double endRadius,
82 const wxGraphicsGradientStops& stops, const wxAffineMatrix2D& matrix);
83
85
88 wxPdfPattern(const wxPdfPattern& pattern);
89
91
94 void SetObjIndex(int index) { m_objIndex = index; };
95
97
100 int GetObjIndex() const { return m_objIndex; };
101
103
106 int GetIndex() const { return m_index; };
107
109
112 void SetImage(wxPdfImage* image) { m_image = image; };
113
115
118 wxPdfImage* GetImage() const {return m_image; };
119
121
124 double GetWidth() const {return m_width; };
125
127
130 double GetHeight() const {return m_height; };
131
133
136 int GetTemplateId() const { return m_templateId; }
137
139
142 wxPdfPatternStyle GetPatternStyle() const { return m_patternStyle; }
143
145
148 wxColour GetDrawColour() const { return m_drawColour; }
149
151
154 void SetFillColour(const wxColour& fillColour) { m_fillColour = fillColour; m_hasFillColour = true; }
155
157
160 wxColour GetFillColour() const { return m_fillColour; }
161
163
166 bool HasFillColour() const { return m_hasFillColour; }
167
169
172 double GetX1() const { return m_x1; }
173
175
178 double GetY1() const { return m_y1; }
179
181
184 double GetX2() const { return m_x2; }
185
187
190 double GetY2() const { return m_y2; }
191
193
196 double GetStartX() const { return m_x1; }
197
199
202 double GetStartY() const { return m_y1; }
203
205
208 double GetEndX() const { return m_x2; }
209
211
214 double GetEndY() const { return m_y2; }
215
217
220 double GetStartRadius() const { return m_radius1; }
221
223
226 double GetEndRadius() const { return m_radius2; }
227
229
232 wxGraphicsGradientStops GetStops() const { return m_stops; }
233
235
238 const wxAffineMatrix2D GetMatrix() const { return m_matrix; }
239
240private:
241 int m_objIndex;
242 int m_index;
243
244 wxPdfPatternStyle m_patternStyle;
245 wxPdfImage* m_image;
246 int m_templateId;
247 wxColour m_drawColour;
248 wxColour m_fillColour;
249 bool m_hasFillColour;
250
251 double m_width;
252 double m_height;
253
254 // Gradients
255 double m_x1;
256 double m_y1;
257 double m_x2;
258 double m_y2;
259 double m_radius1;
260 double m_radius2;
261 wxGraphicsGradientStops m_stops;
262 wxAffineMatrix2D m_matrix;
263};
264
265#endif
Class representing image objects. (For internal use only)
Definition: pdfimage.h:29
Class representing patterns.
Definition: pdfpattern.h:27
double GetY2() const
Get y-coordinate of end point (linear gradient)
Definition: pdfpattern.h:190
void SetImage(wxPdfImage *image)
Set image.
Definition: pdfpattern.h:112
double GetEndRadius() const
Get radius of end circle (radial gradient)
Definition: pdfpattern.h:226
bool HasFillColour() const
Check whether fill color is set.
Definition: pdfpattern.h:166
double GetStartRadius() const
Get radius of start circle (radial gradient)
Definition: pdfpattern.h:220
void SetFillColour(const wxColour &fillColour)
Set fill color.
Definition: pdfpattern.h:154
double GetY1() const
Get y-coordinate of start point (linear gradient)
Definition: pdfpattern.h:178
double GetWidth() const
Get pattern width.
Definition: pdfpattern.h:124
const wxAffineMatrix2D GetMatrix() const
Get transformation matrix.
Definition: pdfpattern.h:238
wxPdfPatternStyle GetPatternStyle() const
Get pattern style.
Definition: pdfpattern.h:142
double GetX2() const
Get x-coordinate of end point (linear gradient)
Definition: pdfpattern.h:184
double GetHeight() const
Get pattern height.
Definition: pdfpattern.h:130
wxColour GetFillColour() const
Get fill color.
Definition: pdfpattern.h:160
double GetEndY() const
Get y-coordinate of center of end circle (radial gradient)
Definition: pdfpattern.h:214
double GetStartY() const
Get y-coordinate of center of start circle (radial gradient)
Definition: pdfpattern.h:202
int GetObjIndex() const
Get object index.
Definition: pdfpattern.h:100
double GetEndX() const
Get x-coordinate of center of end circle (radial gradient)
Definition: pdfpattern.h:208
wxGraphicsGradientStops GetStops() const
Get list of gradient stops.
Definition: pdfpattern.h:232
wxColour GetDrawColour() const
Get draw color.
Definition: pdfpattern.h:148
double GetStartX() const
Get x-coordinate of center of start circle (radial gradient)
Definition: pdfpattern.h:196
void SetObjIndex(int index)
Set object index.
Definition: pdfpattern.h:94
int GetIndex() const
Get pattern index.
Definition: pdfpattern.h:106
wxPdfImage * GetImage() const
Get image.
Definition: pdfpattern.h:118
double GetX1() const
Get x-coordinate of start point (linear gradient)
Definition: pdfpattern.h:172
int GetTemplateId() const
Get template id.
Definition: pdfpattern.h:136
Compile time switches for the wxPdfDocument component.
Interface of the several wxPdfDocument property classes.
wxPdfPatternStyle
Pattern styles.
Definition: pdfproperties.h:238