| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.1.1 Transparency
There are several functions and variables for setup transparency. The general function is Alpha() which switch on/off the transparency for overall plot. It influence only for graphics which created after Alpha() call (with one exception, mglGraphGL). Variable AlphaDef specify the default value of alpha-channel. You may switch off transparency of selected plot by variable Transparent. Finally, variable TranspType set the kind of transparency. See section Transparent surface sample, for sample code and picture.
- Method on mglGraph:
voidAlpha (boolenable) Sets the transparency on/off. It is recommended to call this function before any plotting command. In any case it must be called before
Finish()function if the last is used. Default value is transparency off. Unfortunately it switches the transparency on/off for all subplots. UseTransparent = falsein particular plot to disable its transparency.
- General option of mglGraph:
floatAlphaDef Default value of alpha channel (transparency) for all plotting functions. Note, that OpenGL (mglGraphGL) has incorrect drawing for large values of alpha in case of several overlapping surfaces.
- General option of mglGraph:
boolTransparent Flag which temporary switches transparency on/off for the plot.
- General option of mglGraph:
intTranspType This variable set the transparency type. Normal transparency (‘0’) – below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (‘1’) – below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (‘2’) – below and upper things are commutable and are the source of some additional light. I recommend to set
AlphaDef = 0.3or less for lamp-like transparency.
