wxMaxima
Loading...
Searching...
No Matches
pdflinestyle.h
Go to the documentation of this file.
1
2// Name: pdflinestyle.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-05-25
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_LINE_STYLE_H_
13#define _PDF_LINE_STYLE_H_
14
15// wxWidgets headers
16
17// wxPdfDocument headers
18#include "wx/pdfdocdef.h"
19#include "wx/pdfarraydouble.h"
20#include "wx/pdfcolour.h"
21
24{
25 wxPDF_LINECAP_NONE = -1,
26 wxPDF_LINECAP_BUTT = 0,
27 wxPDF_LINECAP_ROUND = 1,
28 wxPDF_LINECAP_SQUARE = 2
29};
30
33{
34 wxPDF_LINEJOIN_NONE = -1,
35 wxPDF_LINEJOIN_MITER = 0,
36 wxPDF_LINEJOIN_ROUND = 1,
37 wxPDF_LINEJOIN_BEVEL = 2
38};
39
41class WXDLLIMPEXP_PDFDOC wxPdfLineStyle
42{
43public:
45
60 wxPdfLineStyle(double width = -1,
61 wxPdfLineCap cap = wxPDF_LINECAP_NONE, wxPdfLineJoin join = wxPDF_LINEJOIN_NONE,
62 const wxPdfArrayDouble& dash = wxPdfArrayDouble(), double phase = -1,
63 const wxPdfColour& colour = wxPdfColour());
64
66
69 wxPdfLineStyle(const wxPdfLineStyle& lineStyle);
70
72
76 wxPdfLineStyle& operator= (const wxPdfLineStyle& lineStyle);
77
79 virtual ~wxPdfLineStyle();
80
82
85 bool IsSet() const { return m_isSet; }
86
88
91 void SetWidth(double width) { m_width = width; }
92
94
97 double GetWidth() const { return m_width; }
98
100
103 void SetLineCap(const wxPdfLineCap cap) { m_cap = cap; }
104
106
109 wxPdfLineCap GetLineCap() const { return m_cap; }
110
112
115 void SetLineJoin(const wxPdfLineJoin join) { m_join = join; }
116
118
121 wxPdfLineJoin GetLineJoin() const { return m_join; }
122
124
127 void SetDash(const wxPdfArrayDouble& dash) { m_dash = dash; }
128
130
133 const wxPdfArrayDouble& GetDash() const { return m_dash; }
134
136
139 void SetPhase(double phase) { m_phase = phase; }
140
142
145 double GetPhase() const { return m_phase; }
146
148
151 void SetColour(const wxPdfColour& colour) { m_colour = colour; };
152
154
157 const wxPdfColour& GetColour() const { return m_colour; };
158
159private:
160 bool m_isSet;
161 double m_width;
162 wxPdfLineCap m_cap;
163 wxPdfLineJoin m_join;
164 wxPdfArrayDouble m_dash;
165 double m_phase;
166 wxPdfColour m_colour;
167};
168
169#endif
Class representing wxPdfDocument colours.
Definition: pdfcolour.h:40
Class representing line styles.
Definition: pdflinestyle.h:42
wxPdfLineCap GetLineCap() const
Get the line ending style.
Definition: pdflinestyle.h:109
wxPdfLineJoin GetLineJoin() const
Get the line join style.
Definition: pdflinestyle.h:121
void SetLineJoin(const wxPdfLineJoin join)
Set the line join style.
Definition: pdflinestyle.h:115
const wxPdfArrayDouble & GetDash() const
Get the dash pattern.
Definition: pdflinestyle.h:133
void SetDash(const wxPdfArrayDouble &dash)
Set the dash pattern.
Definition: pdflinestyle.h:127
double GetPhase() const
Get the dash pattern phase.
Definition: pdflinestyle.h:145
double GetWidth() const
Get the line width.
Definition: pdflinestyle.h:97
void SetWidth(double width)
Set the line width.
Definition: pdflinestyle.h:91
const wxPdfColour & GetColour() const
Get the line colour.
Definition: pdflinestyle.h:157
void SetPhase(double phase)
Set the dash pattern phase.
Definition: pdflinestyle.h:139
bool IsSet() const
Check whether the style is initialized.
Definition: pdflinestyle.h:85
void SetColour(const wxPdfColour &colour)
Set the line colour.
Definition: pdflinestyle.h:151
void SetLineCap(const wxPdfLineCap cap)
Set the line ending style.
Definition: pdflinestyle.h:103
Definition of array of type double.
Interface of the wxPdfColour class.
Compile time switches for the wxPdfDocument component.
wxPdfLineCap
Line Cap options.
Definition: pdflinestyle.h:24
wxPdfLineJoin
Line join options.
Definition: pdflinestyle.h:33