Next: , Previous: , Up: MathGL core   [Contents][Index]


5.6 Background

These functions change background image.

MGL command: clf ['col']
MGL command: clf r g b
Method on mglGraph: void Clf ()
Method on mglGraph: void Clf (const char * col)
Method on mglGraph: void Clf (char col)
Method on mglGraph: void Clf (mreal r, mreal g, mreal b)
C function: void mgl_clf (HMGL gr)
C function: void mgl_clf_str (HMGL gr, const char * col)
C function: void mgl_clf_chr (HMGL gr, char col)
C function: void mgl_clf_rgb (HMGL gr, mreal r, mreal g, mreal b)

Clear the picture and fill background by specified color.

MGL command: rasterize
Method on mglGraph: void Rasterize ()
C function: void mgl_rasterize (HMGL gr)

Force drawing the plot and use it as background. After it, function clear the list of primitives, like clf. This function is useful if you want save part of plot as bitmap one (for example, large surfaces, isosurfaces or vector fields) and keep some parts as vector one (like annotation, curves, axis and so on).

MGL command: background 'fname' [alpha=1]
Method on mglGraph: void LoadBackground (const char * fname, double alpha=1)
C function: void mgl_load_background (HMGL gr, const char * fname, double alpha)

Load PNG or JPEG file fname as background for the plot. Parameter alpha manually set transparency of the background.





Next: , Previous: , Up: MathGL core   [Contents][Index]