to_int


Description:

public int to_int ()

Converts this to a 32 bit integer.

This function can be useful for serializing the color so that it can be stored and retrieved easily with hash tables and lists.

The returned integer will contain the four channels that define the Granite.Drawing.Color class: alpha, red, green and blue.

Each channel is represented by 8 bits. The first 8 bits of the integer conatin the alpha channel while all other 24 bits represent red, green and blue channels respectively.

The format written as a string would look like this:

AAAAAAAA RRRRRRRR GGGGGGGG BBBBBBBB

where A is one bit of alpha chnnel, R of red channel, G of green channel and B of blue channel.

Returns:

a 32 bit integer representing this