| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.3 mglColor class
Structure for working with colors. This structure is defined in #include <mgl2/type.h>.
There are two ways to set the color in MathGL. First one is using of mreal values of red, green and blue channels for precise color definition. The second way is the using of character id. There are a set of characters specifying frequently used colors. Normally capital letter gives more dark color than lowercase one. See section Line styles.
- Method on mglColor:
mglColor (mrealR,mrealG,mrealB,mrealA=1) Constructor sets the color by mreal values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
- Method on mglColor:
mglColor (charc='k',mrealbright=1) Constructor sets the color from character id. The black color is used by default. Parameter br set additional “lightness” of color.
- Method on mglColor:
voidSet (mrealR,mrealG,mrealB,mrealA=1) Sets color from values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
- Method on mglColor:
voidSet (mglColorc,mrealbright=1) Sets color as “lighted” version of color c.
- Method on mglColor:
booloperator== (const mglColor &c) - Method on mglColor:
booloperator!= (const mglColor &c) Compare with another color
- Library Function: mglColor operator+ (
const mglColor &a,const mglColor &b) Adds colors by its RGB values.
- Library Function:
mglColoroperator- (const mglColor &a,const mglColor &b) Subtracts colors by its RGB values.
- Library Function:
mglColoroperator* (const mglColor &a,mrealb) - Library Function:
mglColoroperator* (mreala,const mglColor &b) Multiplies color by number.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
