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

Protected Member Functions

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

Static Protected Member Functions

static wxColourDatabaseGetColourDatabase ()
 Get a colour database.
 

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 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() [3/7]

void wxPdfColour::SetColour ( const wxColour & colour)

Set wxColour colour.

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

◆ SetColour() [4/7]

void wxPdfColour::SetColour ( const wxPdfPattern & pattern)

Set a pattern based colour (internal use only)

Parameters
patternis the pattern based colour to be used

◆ SetColour() [5/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() [6/7]

void wxPdfColour::SetColour ( const wxString & name)

Set a named RGB colour.

Parameters
nameis the name of the requested colour

◆ SetColour() [7/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

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