Public Member Functions | Public Attributes | Static Public Attributes

Tiny2D::Color Struct Reference

Color with RGBA components. More...

#include <Tiny2D_Base.h>

List of all members.

Public Member Functions

 Color (float r=1.0f, float g=1.0f, float b=1.0f, float a=1.0f)
 Constructs color.
 Color (const Color &other)
 Copy constructor.
Color operator* (float multiplier) const
 Multiplies color by float factor.
Color operator+ (const Color &other) const
 Adds colors.
Color operator- (const Color &other) const
 Subtracts colors.
Color operator* (const Color &other) const
 Multiplies two colors together.

Public Attributes

float r
 Red color component.
float g
 Green color component.
float b
 Blue color component.
float a
 Alpha/transparency color component.

Static Public Attributes

static Color White
 White color i.e. (1,1,1,1)
static Color Black
 Black color i.e. (0,0,0,1)
static Color Red
 Red color i.e. (1,0,0,1)
static Color Green
 Green color i.e. (0,1,0,1)
static Color Blue
 Blue color i.e. (0,0,1,1)
static Color Yellow
 Yellow color i.e. (1,1,0,1)

Detailed Description

Color with RGBA components.


Constructor & Destructor Documentation

Tiny2D::Color::Color ( float  r = 1.0f,
float  g = 1.0f,
float  b = 1.0f,
float  a = 1.0f 
) [inline]

Constructs color.

Tiny2D::Color::Color ( const Color other ) [inline]

Copy constructor.


Member Function Documentation

Color Tiny2D::Color::operator* ( float  multiplier ) const [inline]

Multiplies color by float factor.

Color Tiny2D::Color::operator* ( const Color other ) const [inline]

Multiplies two colors together.

Color Tiny2D::Color::operator+ ( const Color other ) const [inline]

Adds colors.

Color Tiny2D::Color::operator- ( const Color other ) const [inline]

Subtracts colors.


Member Data Documentation

Alpha/transparency color component.

Blue color component.

Black color i.e. (0,0,0,1)

Blue color i.e. (0,0,1,1)

Green color component.

Green color i.e. (0,1,0,1)

Red color component.

Red color i.e. (1,0,0,1)

White color i.e. (1,1,1,1)

Yellow color i.e. (1,1,0,1)


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines