| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.2.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, OpenGL). Function alphadef specify the default value of alpha-channel. Finally, function transptype set the kind of transparency. See section Transparency and lighting, for sample code and picture.
- MGL command: alpha
[val=on] - Method on
mglGraph:voidAlpha (boolenable) - C function:
voidmgl_set_alpha (HMGLgr,intenable) Sets the transparency on/off and returns previous value of transparency. It is recommended to call this function before any plotting command. Default value is transparency off.
- MGL command: alphadef
val - Method on
mglGraph:voidSetAlphaDef (mrealval) - C function:
voidmgl_set_alpha_default (HMGLgr,mrealalpha) Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.
- MGL command: transptype
val - Method on
mglGraph:voidSetTranspType (inttype) - C function:
voidmgl_set_transp_type (HMGLgr,inttype) Set the type of transparency. Possible values are:
- 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
SetAlphaDef(0.3)or less for lamp-like transparency.
See section Types of transparency, for sample code and picture..
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
