[ < ] [ > ]   [ << ] [ 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: void Alpha (bool enable)
C function: void mgl_set_alpha (HMGL gr, int enable)

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: void SetAlphaDef (float val)
C function: void mgl_set_alpha_default (HMGL gr, float alpha)

Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.

MGL command: transptype val
Method on mglGraph: void SetTranspType (int type)
C function: void mgl_set_transp_type (HMGL gr, int type)

Set the type of transparency. Possible values are:

See section Types of transparency, for sample code and picture..


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Autobuild on July 16, 2012 using texi2html 1.82.