SwColor

From SWWorkshop

Jump to: navigation, search

It holds color values (Red,Green,Blue,Alpha). Color values defined [0,1] range.

Structure

typedef struct _swColor{
	float r;
	float g;
	float b;
	float a; 
}swColor;

Constant Colors

static swColor SWCOLOR_BLACK={0,0,0,1};
static swColor SWCOLOR_GRAY={0.5,0.5,0.5,1};
static swColor SWCOLOR_WHITE={1,1,1,1};
static swColor SWCOLOR_RED={1,0,0,1};
static swColor SWCOLOR_BLUE={0,0,1,1};
static swColor SWCOLOR_GREEN={0,1,0,1};


Functions

swColor* swColorCreate(float r,float g,float b,float a);
void swColorDestroy(swColor *color);
void swColorSet(swColor *color,float x,float y,float w,float h);
void swColorCopy(swColor *copy,swColor *real);
swColor* swColorClone(swColor *real);
Personal tools