wxPdfDocument  0.9.6
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
wxPdfColour Class Reference

Class representing wxPdfDocument colours. More...

#include <pdfcolour.h>

Public Member Functions

 wxPdfColour ()
 Default constructor. More...
 
 wxPdfColour (const unsigned char grayscale)
 Constructor for grayscale colour. More...
 
 wxPdfColour (const wxColour &colour)
 Constructor for wxColour colour. More...
 
 wxPdfColour (const unsigned char red, const unsigned char green, const unsigned char blue)
 Constructor for RGB colour. More...
 
 wxPdfColour (double cyan, double magenta, double yellow, double black)
 Constructor for CMYK colour. More...
 
 wxPdfColour (const wxString &name)
 Constructor for named RGB colour. More...
 
 wxPdfColour (const wxPdfSpotColour &spotColour, double tint)
 Constructor for named RGB colour. More...
 
 wxPdfColour (const wxPdfPattern &pattern)
 Constructor for pattern based colour. More...
 
 wxPdfColour (const wxPdfColour &colour)
 Copy constructor. More...
 
wxPdfColouroperator= (const wxPdfColour &colour)
 Assignment operator. More...
 
void SetColour (const unsigned char grayscale=0)
 Set grayscale colour. More...
 
void SetColour (const wxColour &colour)
 Set wxColour colour. More...
 
void SetColour (const unsigned char red, const unsigned char green, const unsigned char blue)
 Set RGB colour. More...
 
void SetColour (double cyan, double magenta, double yellow, double black)
 Set CMYK colour. More...
 
void SetColour (const wxString &name)
 Set a named RGB colour. More...
 
void SetColour (const wxPdfSpotColour &spotColour, double tint)
 Set a spot colour (internal use only) More...
 
void SetColour (const wxPdfPattern &pattern)
 Set a pattern based colour (internal use only) More...
 
const wxString GetColour (bool drawing) const
 Get internal colour string representation (for internal use only) More...
 
wxPdfColourType GetColourType () const
 Get colour type. More...
 
const wxString GetColourValue () const
 Get internal colour value string representation (for internal use only) More...
 
bool Equals (const wxPdfColour &colour) const
 Compare colour. More...
 

Protected Member Functions

 wxPdfColour (const wxString &colour, bool intern)
 Constructor for internal colour string representation. More...
 

Static Protected Member Functions

static wxColourDatabaseGetColourDatabase ()
 Get a colour database. More...
 

Detailed Description

Class representing wxPdfDocument colours.

Constructor & Destructor Documentation

◆ wxPdfColour() [1/10]

wxPdfColour::wxPdfColour ( )

Default constructor.

Constructs a colour object with an undefined colour

◆ wxPdfColour() [2/10]

wxPdfColour::wxPdfColour ( const unsigned char  grayscale)

Constructor for grayscale colour.

Defines a grayscale colour

Parameters
grayscaleindicates the gray level. Value between 0 and 255

◆ wxPdfColour() [3/10]

wxPdfColour::wxPdfColour ( const wxColour &  colour)

Constructor for wxColour colour.

Defines a wxColour colour.

Parameters
colourdefines a wxColour colour composed of a red, green and blue component

◆ wxPdfColour() [4/10]

wxPdfColour::wxPdfColour ( const unsigned char  red,
const unsigned char  green,
const unsigned char  blue 
)

Constructor for RGB colour.

Defines a RGB colour.

Parameters
redindicates the red level. Value between 0 and 255
greenindicates the green level. Value between 0 and 255
blueindicates the blue level. Value between 0 and 255

◆ wxPdfColour() [5/10]

wxPdfColour::wxPdfColour ( double  cyan,
double  magenta,
double  yellow,
double  black 
)

Constructor for CMYK colour.

Defines a CMYK colour.

Parameters
cyanindicates the cyan level. Value between 0 and 100
magentaindicates the magenta level. Value between 0 and 100
yellowindicates the yellow level. Value between 0 and 100
blackindicates the black level. Value between 0 and 100

◆ wxPdfColour() [6/10]

wxPdfColour::wxPdfColour ( const wxString &  name)

Constructor for named RGB colour.

Defines a named RGB colour.

Parameters
nameis the name of the requested colour. Use of HTML notation #rrggbb as colour name is also supported.

◆ wxPdfColour() [7/10]

wxPdfColour::wxPdfColour ( const wxPdfSpotColour spotColour,
double  tint 
)

Constructor for named RGB colour.

Defines a spot colour.

Parameters
spotColouris the spot colour to be used
tintindicates the tint level. Value between 0 and 100. Default: 100.

◆ wxPdfColour() [8/10]

wxPdfColour::wxPdfColour ( const wxPdfPattern pattern)

Constructor for pattern based colour.

Defines a pattern based colour.

Parameters
patternis the pattern based colour to be used

◆ wxPdfColour() [9/10]

wxPdfColour::wxPdfColour ( const wxPdfColour colour)

Copy constructor.

◆ wxPdfColour() [10/10]

wxPdfColour::wxPdfColour ( const wxString &  colour,
bool  intern 
)
protected

Constructor for internal colour string representation.

Member Function Documentation

◆ Equals()

bool wxPdfColour::Equals ( const wxPdfColour colour) const

Compare colour.

Parameters
colourcolour to which the current colour is compared
Returns
TRUE if the colours match, FALSE otherwise

◆ GetColour()

const wxString wxPdfColour::GetColour ( bool  drawing) const

Get internal colour string representation (for internal use only)

Parameters
drawingflag specifying whether the colour is used for drawing operations
Returns
the string representation of the colour

◆ GetColourDatabase()

static wxColourDatabase* wxPdfColour::GetColourDatabase ( )
staticprotected

Get a colour database.

◆ GetColourType()

wxPdfColourType wxPdfColour::GetColourType ( ) const
inline

Get colour type.

Returns
the colour type of the colour

◆ GetColourValue()

const wxString wxPdfColour::GetColourValue ( ) const

Get internal colour value string representation (for internal use only)

Returns
the string representation of the colour value This method works only for grayscale, rgb and cmyk colours. Don't use it for spot or pattern colours.

◆ operator=()

wxPdfColour& wxPdfColour::operator= ( const wxPdfColour colour)

Assignment operator.

◆ SetColour() [1/7]

void wxPdfColour::SetColour ( const unsigned char  grayscale = 0)

Set grayscale colour.

Parameters
grayscaleindicates the gray level. Value between 0 and 255. Default: 0 (Black).

◆ SetColour() [2/7]

void wxPdfColour::SetColour ( const wxColour &  colour)

Set wxColour colour.

Parameters
colourdefines a wxColour colour composed of a red, green and blue component

◆ SetColour() [3/7]

void wxPdfColour::SetColour ( const unsigned char  red,
const unsigned char  green,
const unsigned char  blue 
)

Set RGB colour.

Parameters
redindicates the red level. Value between 0 and 255
greenindicates the green level. Value between 0 and 255
blueindicates the blue level. Value between 0 and 255

◆ SetColour() [4/7]

void wxPdfColour::SetColour ( double  cyan,
double  magenta,
double  yellow,
double  black 
)

Set CMYK colour.

Parameters
cyanindicates the cyan level. Value between 0 and 100
magentaindicates the magenta level. Value between 0 and 100
yellowindicates the yellow level. Value between 0 and 100
blackindicates the black level. Value between 0 and 100

◆ SetColour() [5/7]

void wxPdfColour::SetColour ( const wxString &  name)

Set a named RGB colour.

Parameters
nameis the name of the requested colour

◆ SetColour() [6/7]

void wxPdfColour::SetColour ( const wxPdfSpotColour spotColour,
double  tint 
)

Set a spot colour (internal use only)

Parameters
spotColouris the spot colour to be used
tintindicates the tint level. Value between 0 and 100. Default: 100.

◆ SetColour() [7/7]

void wxPdfColour::SetColour ( const wxPdfPattern pattern)

Set a pattern based colour (internal use only)

Parameters
patternis the pattern based colour to be used

The documentation for this class was generated from the following file: