MyGUI::Colour Struct Reference

`#include <MyGUI_Colour.h>`

## Public Member Functions

| Colour ()=default
| Colour (float _red, float _green, float _blue, float _alpha=1)
| Colour (std::string_view _value)
bool | operator== (Colour const &_value) const
bool | operator!= (Colour const &_value) const
void | set (float _red, float _green, float _blue, float _alpha=1)
void | clear ()
std::string | print () const

## Static Public Member Functions

static Colour | parse (std::string_view _value)
static std::ostream & | operatorShiftLeft (std::ostream &_stream, const Colour &_value)
static std::istream & | operatorShiftRight (std::istream &_stream, Colour &_value)

## Data Fields

float | red {1.0f}
float | green {1.0f}
float | blue {1.0f}
float | alpha {1.0f}

## Static Public Attributes

static const Colour | Zero = Colour(0, 0, 0, 0)
static const Colour | Black = Colour(0, 0, 0, 1)
static const Colour | White = Colour(1, 1, 1, 1)
static const Colour | Red = Colour(1, 0, 0, 1)
static const Colour | Green = Colour(0, 1, 0, 1)
static const Colour | Blue = Colour(0, 0, 1, 1)

## Friends

std::ostream & | operator<< (std::ostream &_stream, const Colour &_value)
std::istream & | operator>> (std::istream &_stream, Colour &_value)

## Detailed Description

Definition at line 16 of file MyGUI_Colour.h.

## Constructor & Destructor Documentation

## Colour() [1/3]

MyGUI::Colour::Colour | ( |  | ) |

default

## Colour() [2/3]

MyGUI::Colour::Colour | ( | float | _red,
|  | float | _green,
|  | float | _blue,
|  | float | _alpha = 1 )

Definition at line 20 of file MyGUI_Colour.cpp.

## Colour() [3/3]

MyGUI::Colour::Colour | ( | std::string_view | _value | ) |

explicit

Definition at line 28 of file MyGUI_Colour.cpp.

## Member Function Documentation

## clear()

void MyGUI::Colour::clear | ( |  | ) |

Definition at line 51 of file MyGUI_Colour.cpp.

## operator!=()

bool MyGUI::Colour::operator!= | ( | Colour const & | _value | ) | const

Definition at line 38 of file MyGUI_Colour.cpp.

## operator==()

bool MyGUI::Colour::operator== | ( | Colour const & | _value | ) | const

Definition at line 33 of file MyGUI_Colour.cpp.

## operatorShiftLeft()

std::ostream & MyGUI::Colour::operatorShiftLeft | ( | std::ostream & | _stream,
|  | const Colour & | _value )

static

Definition at line 101 of file MyGUI_Colour.cpp.

## operatorShiftRight()

std::istream & MyGUI::Colour::operatorShiftRight | ( | std::istream & | _stream,
|  | Colour & | _value )

static

Definition at line 107 of file MyGUI_Colour.cpp.

## parse()

Colour MyGUI::Colour::parse | ( | std::string_view | _value | ) |

static

Definition at line 63 of file MyGUI_Colour.cpp.

## print()

std::string MyGUI::Colour::print | ( |  | ) | const

Definition at line 56 of file MyGUI_Colour.cpp.

## set()

void MyGUI::Colour::set | ( | float | _red,
|  | float | _green,
|  | float | _blue,
|  | float | _alpha = 1 )

Definition at line 43 of file MyGUI_Colour.cpp.

## Friends And Related Symbol Documentation

## operator<<

std::ostream & operator<< | ( | std::ostream & | _stream,
|  | const Colour & | _value )

friend

Definition at line 34 of file MyGUI_Colour.h.

## operator>>

std::istream & operator>> | ( | std::istream & | _stream,
|  | Colour & | _value )

friend

Definition at line 39 of file MyGUI_Colour.h.

## Field Documentation

## alpha

float MyGUI::Colour::alpha {1.0f}

Definition at line 51 of file MyGUI_Colour.h.

## Black

const Colour MyGUI::Colour::Black = Colour(0, 0, 0, 1)

static

Definition at line 54 of file MyGUI_Colour.h.

## Blue

const Colour MyGUI::Colour::Blue = Colour(0, 0, 1, 1)

static

Definition at line 58 of file MyGUI_Colour.h.

## blue

float MyGUI::Colour::blue {1.0f}

Definition at line 50 of file MyGUI_Colour.h.

## Green

const Colour MyGUI::Colour::Green = Colour(0, 1, 0, 1)

static

Definition at line 57 of file MyGUI_Colour.h.

## green

float MyGUI::Colour::green {1.0f}

Definition at line 49 of file MyGUI_Colour.h.

## Red

const Colour MyGUI::Colour::Red = Colour(1, 0, 0, 1)

static

Definition at line 56 of file MyGUI_Colour.h.

## red

float MyGUI::Colour::red {1.0f}

Definition at line 48 of file MyGUI_Colour.h.

## White

const Colour MyGUI::Colour::White = Colour(1, 1, 1, 1)

static

Definition at line 55 of file MyGUI_Colour.h.

## Zero

const Colour MyGUI::Colour::Zero = Colour(0, 0, 0, 0)

static

Definition at line 53 of file MyGUI_Colour.h.

The documentation for this struct was generated from the following files:

- MyGUI_Colour.h
- MyGUI_Colour.cpp