CSS::Colour Class Reference

#include <CSSUnit.hpp>

List of all members.


Detailed Description

This class is used to parse and store colours from multiple format.


Public Member Functions

 Colour (const char *const input, const int length)
 Construct a color from an HEX triplet.
 Colour (const uint8 _R=0, const uint8 _G=0, const uint8 _B=0, const uint8 _A=0)
 The default constructor.
bool fromString (const char *const input, const int length)
 Change the color from the string if the string matches the WWW HTML4.01 color standard.
const bool operator!= (const Colour &colour) const
 Equivalence operators.
const bool operator== (const Colour &colour) const
 Equivalence operators.
void toString (char *output, int &length)
 Export this color as string like WWW HTML4.01 color standard.

Public Attributes

uint8 A
uint8 B
uint8 G
uint8 R
 The colour components (here as RGB + alpha).


Constructor & Destructor Documentation

CSS::Colour::Colour ( const uint8  _R = 0,
const uint8  _G = 0,
const uint8  _B = 0,
const uint8  _A = 0 
) [inline]

The default constructor.

CSS::Colour::Colour ( const char *const  input,
const int  length 
) [inline]

Construct a color from an HEX triplet.


Member Function Documentation

bool CSS::Colour::fromString ( const char *const  input,
const int  length 
) [inline]

Change the color from the string if the string matches the WWW HTML4.01 color standard.

Returns:
true if the string was correct

const bool CSS::Colour::operator!= ( const Colour colour  )  const [inline]

Equivalence operators.

const bool CSS::Colour::operator== ( const Colour colour  )  const [inline]

Equivalence operators.

void CSS::Colour::toString ( char *  output,
int &  length 
) [inline]

Export this color as string like WWW HTML4.01 color standard.

Parameters:
output if set to 0, then the method put the required length in length
length if the allocated area is smaller than required, the length param is adjusted to the minimum size


Member Data Documentation

uint8 CSS::Colour::A

uint8 CSS::Colour::B

uint8 CSS::Colour::G

uint8 CSS::Colour::R

The colour components (here as RGB + alpha).


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is