Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::gfx::Color Class Reference

Color class. More...

#include <Color.h>

Public Member Functions

 Color ()
 Sazande khali ke hich kari anjam nemide.
 Color (int Red, int Green, int Blue)
 Sazande ba se rang Ghermez va Sabz va Abi.
void Set (int Red, int Green, int Blue, int Alpha)
s32 toOpenGLColor () const
s32 getAlpha () const
s32 getRed () const
s32 getGreen () const
s32 getBlue () const

Public Attributes

s32 c
 A8R8G8B8 color format.

Detailed Description

Color class.

Definition at line 17 of file Color.h.

Constructor & Destructor Documentation

kge::gfx::Color::Color ( )
inline

Sazande khali ke hich kari anjam nemide.

Definition at line 22 of file Color.h.

kge::gfx::Color::Color ( int  Red,
int  Green,
int  Blue 
)
inline

Sazande ba se rang Ghermez va Sabz va Abi.

Parameters
RedSet kardane range ghermez 0 ta 255.
GreenSet kardane range sabz 0 ta 255.
BlueSet kardane range Abi 0 ta 255.

Definition at line 30 of file Color.h.

Member Function Documentation

s32 kge::gfx::Color::getAlpha ( ) const
inline

Returns the alpha component of the color. The alpha component defines how transparent a color should be. 0 means not transparent, 255 means fully transparent.

Definition at line 52 of file Color.h.

References c.

s32 kge::gfx::Color::getBlue ( ) const
inline

Returns the blue component of the color.

Returns
Returns a value between 0 and 255, specifying how blue the color is. 0 means dark, 255 means full blue.

Definition at line 67 of file Color.h.

References c.

s32 kge::gfx::Color::getGreen ( ) const
inline

Returns the green component of the color.

Returns
Returns a value between 0 and 255, specifying how green the color is. 0 means dark, 255 means full green.

Definition at line 62 of file Color.h.

References c.

s32 kge::gfx::Color::getRed ( ) const
inline

Returns the red component of the color.

Returns
Returns a value between 0 and 255, specifying how red the color is. 0 means dark, 255 means full red.

Definition at line 57 of file Color.h.

References c.

void kge::gfx::Color::Set ( int  Red,
int  Green,
int  Blue,
int  Alpha 
)
inline

Definition at line 34 of file Color.h.

References c.

s32 kge::gfx::Color::toOpenGLColor ( ) const
inline

Converts color to OpenGL color format.

Returns
Returns the 32 bit OpenGL color value (RGBA)

Definition at line 41 of file Color.h.

References c.

Member Data Documentation

s32 kge::gfx::Color::c

A8R8G8B8 color format.

Definition at line 70 of file Color.h.

Referenced by getAlpha(), getBlue(), getGreen(), getRed(), Set(), and toOpenGLColor().


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