Class implementing several static utility methods.
More...
#include <pdfutility.h>
|
static wxString | GetUniqueId (const wxString &prefix=wxEmptyString) |
| Create a unique ID.
|
|
static wxString | Double2String (double value, int precision=0) |
| Formats a floating point number with a fixed precision.
|
|
static double | String2Double (const wxString &str) |
| Parses a floating point number.
|
|
static double | String2Double (const wxString &str, const wxString &defaultUnit, double scaleFactor=1.0) |
| Parses a floating point number taking units into account.
|
|
static wxString | Convert2Roman (int value) |
| Converts an integer number to a roman number.
|
|
static double | ForceRange (double value, double minValue, double maxValue) |
| Forces a floating point number into a fixed range.
|
|
static wxString | RGB2String (const wxColour &colour) |
| Converts a wxColour to the corresponding PDF specification.
|
|
Class implementing several static utility methods.
◆ Convert2Roman()
static wxString wxPdfUtility::Convert2Roman |
( |
int | value | ) |
|
|
static |
Converts an integer number to a roman number.
- Parameters
-
value | integer value to be converted |
- Returns
- the string representation of the integer value as a roman number
◆ Double2String()
static wxString wxPdfUtility::Double2String |
( |
double | value, |
|
|
int | precision = 0 ) |
|
static |
Formats a floating point number with a fixed precision.
- Parameters
-
value | the value to be formatted |
precision | the number of decimal places |
- Returns
- the string representation of the number
◆ ForceRange()
static double wxPdfUtility::ForceRange |
( |
double | value, |
|
|
double | minValue, |
|
|
double | maxValue ) |
|
static |
Forces a floating point number into a fixed range.
- Parameters
-
value | value to be forced into range |
minValue | lower limit |
maxValue | upper limit |
- Returns
- value conforming to the given range:
- the minValue if the value falls below the lower limit
- the value itself if it is within range
- the maxValue if the value exceeds the upper limit
◆ GetUniqueId()
static wxString wxPdfUtility::GetUniqueId |
( |
const wxString & | prefix = wxEmptyString | ) |
|
|
static |
◆ RGB2String()
static wxString wxPdfUtility::RGB2String |
( |
const wxColour & | colour | ) |
|
|
static |
Converts a wxColour to the corresponding PDF specification.
- Parameters
-
colour | colour to be converted to a hexadecimal string representation |
- Returns
- the hexadecimal string representation of the colour
◆ String2Double() [1/2]
static double wxPdfUtility::String2Double |
( |
const wxString & | str | ) |
|
|
static |
Parses a floating point number.
- Parameters
-
str | the string to be parsed |
- Returns
- the value of floating point number given by the string representation, 0 if the string could not be parsed.
◆ String2Double() [2/2]
static double wxPdfUtility::String2Double |
( |
const wxString & | str, |
|
|
const wxString & | defaultUnit, |
|
|
double | scaleFactor = 1.0 ) |
|
static |
Parses a floating point number taking units into account.
- Parameters
-
str | the string to be parsed |
defaultUnit | the unit that should be assumed if the string includes no explicit unit |
scaleFactor | the scale factor that should be applied for unit conversions involving pixels |
- Returns
- the value of floating point number given by the string representation, 0 if the string could not be parsed.
The documentation for this class was generated from the following file: