wxMaxima
Loading...
Searching...
No Matches
pdfutility.h
Go to the documentation of this file.
1
2// Name: pdfutility.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-05-20
6// Copyright: (c) 2009-2026 Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_UTILITY_H_
13#define _PDF_UTILITY_H_
14
15// wxWidgets headers
16#include <wx/font.h>
17#include <wx/string.h>
18
19// wxPdfDocument headers
20#include "wx/pdfdocdef.h"
21#include "wx/pdfproperties.h"
22
24class WXDLLIMPEXP_PDFDOC wxPdfUtility
25{
26public:
28
32 static wxString GetUniqueId(const wxString& prefix = wxEmptyString);
33
35
40 static wxString Double2String(double value, int precision = 0);
41
43
48 static double String2Double(const wxString& str);
49
51
58 static double String2Double(const wxString& str, const wxString& defaultUnit, double scaleFactor = 1.0);
59
61
65 static wxString Convert2Roman(int value);
66
68
77 static double ForceRange(double value, double minValue, double maxValue);
78
80
84 static wxString RGB2String(const wxColour& colour);
85
87
91 static int MapFontWeight2FontStyle(wxPdfFontWeight fontWeight);
93 static int MapFontWeight2FontStyle(wxFontWeight fontWeight);
94
96
100 static wxString MapFontWeight2FontStyleString(wxPdfFontWeight fontWeight);
102 static wxString MapFontWeight2FontStyleString(wxFontWeight fontWeight);
103
105
109 static wxPdfFontWeight MapFontStyle2FontWeight(int fontStyle);
111 static wxPdfFontWeight MapFontStyle2FontWeight(const wxString& fontStyle);
112
114
118 static int MapFontStyle2StyleFlags(const wxString& fontStyle);
119
121
127 static int MapFont2FontStyle(const wxFont& font);
128
130
136 static int MapFontName2FontStyle(const wxString& fontName);
137
139
145 static wxString MapFontStyle2String(int fontStyle);
146
147private:
148 static bool ms_seeded;
149 static int ms_s1;
150 static int ms_s2;
151};
152
153#endif
Class implementing several static utility methods.
Definition: pdfutility.h:25
Compile time switches for the wxPdfDocument component.
Interface of the several wxPdfDocument property classes.
wxPdfFontWeight
Font weights.
Definition: pdfproperties.h:105