manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.3.1 Transparency (Pure C)

There are several functions 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. 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.

C function: void mgl_set_alpha (HMGL gr, int enable)

Sets the transparency on/off. It is recommended to call this function before any plotting command. Default value is transparency off. Use mgl_set_transp(false) in particular plot to disable its transparency.

C function: void mgl_set_alpha_default (HMGL gr, float alpha)

Default value of alpha channel (transparency) for all plotting functions.

C function: void mgl_set_transp (HMGL gr, int enable)

Temporary switches transparency on/off for the plot.

C function: void mgl_set_transp_type (HMGL gr, int enable)

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 mgl_set_alpha_default(0.3) or less for lamp-like transparency.


© manpagez.com 2000-2026
Individual documents may contain additional copyright information.