Main | API | WebRender | clearColor

Function

clearColor(red, green, blue, alpha);

Sets the initial colour for the pixel buffer.

Parameters

Red - [Unsigned Integer]

Red channel value from 0-255.

Green - [Unsigned Integer]

Green channel value from 0-255.

Blue - [Unsigned Integer]

Blue channel value from 0-255.

Alpha - [Unsigned Integer]

Alpha channel value from 0-255.

Return

Success - [Boolean]

Returns 0/false if an error is detected, else returns 1/true.

Description

This function sets the PROP_CLEAR_COLOUR property to the color defined by the paramters. Since PROP_CLEAR_COLOUR stores the colour as a single 32-bit number, it is useful to have this function to update the colour using 0-255 channel values. The default value for this is 0, which is transparent. This is the color value used by clearBuffer when clearing the pixel buffer.

Additional Notes

None.