6.5 wxMathGL class

Class is WX widget which display MathGL graphics. It is defined in #include <mgl2/wx.h>.

Method on wxMathGL: void SetDraw (mglDraw *dr)

Sets drawing functions from a class inherited from mglDraw.

Method on wxMathGL: void SetDraw (int (*draw)(mglBase *gr, void *p), void *par=NULL)
Method on wxMathGL: void SetDraw (int (*draw)(mglGraph *gr))

Sets the drawing function draw. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter par contains pointer to data for the plotting function draw.

Method on wxMathGL: void SetGraph (HMGL gr)
Method on wxMathGL: void SetGraph (mglGraph *gr)

Set pointer to external grapher (instead of built-in one). Note that wxMathGL will automatically delete this object at destruction or at new setGraph() call.

Method on wxMathGL: HMGL GetGraph ()

Get pointer to grapher.

Method on wxMathGL: void SetPopup (wxMenu *p)

Set popup menu pointer.

Method on wxMathGL: void SetSize (int w, int h)

Set widget/picture sizes

Method on wxMathGL: double GetRatio ()

Return aspect ratio of the picture.

Method on wxMathGL: int GetPer ()

Get perspective value in percents.

Method on wxMathGL: int GetPhi ()

Get Phi-angle value in degrees.

Method on wxMathGL: int GetTet ()

Get Theta-angle value in degrees.

Method on wxMathGL: bool GetAlpha ()

Get transparency state.

Method on wxMathGL: bool GetLight ()

Get lightning state.

Method on wxMathGL: bool GetZoom ()

Get mouse zooming state.

Method on wxMathGL: bool GetRotate ()

Get mouse rotation state.

Method on wxMathGL: void Repaint ()

Redraw saved bitmap without executing drawing function.

Method on wxMathGL: void Update ()

Update picture by executing drawing function.

Method on wxMathGL: void Copy ()

Copy graphics to clipboard.

Method on wxMathGL: void Print ()

Print current picture.

Method on wxMathGL: void Adjust ()

Adjust image size to fit whole widget.

Method on wxMathGL: void NextSlide ()

Show next slide.

Method on wxMathGL: void PrevSlide ()

Show previous slide.

Method on wxMathGL: void Animation (bool st=true)

Start/stop animation.

Method on wxMathGL: void SetPer (int val)

Set perspective value.

Method on wxMathGL: void SetPhi (int val)

Set Phi-angle value.

Method on wxMathGL: void SetTet (int val)

Set Theta-angle value.

Method on wxMathGL: void SetAlpha (bool val)

Switch on/off transparency.

Method on wxMathGL: void SetLight (bool val)

Switch on/off lightning.

Method on wxMathGL: void SetZoom (bool val)

Switch on/off mouse zooming.

Method on wxMathGL: void SetRotate (bool val)

Switch on/off mouse rotation.

Method on wxMathGL: void ZoomIn ()

Zoom in graphics.

Method on wxMathGL: void ZoomOut ()

Zoom out graphics.

Method on wxMathGL: void ShiftLeft ()

Shift graphics to left direction.

Method on wxMathGL: void ShiftRight ()

Shift graphics to right direction.

Method on wxMathGL: void ShiftUp ()

Shift graphics to up direction.

Method on wxMathGL: void ShiftDown ()

Shift graphics to down direction.

Method on wxMathGL: void Restore ()

Restore zoom and rotation to default values.

Method on wxMathGL: void About ()

Show about information.

Method on wxMathGL: void ExportPNG (QString fname="")

Export current picture to PNG file.

Method on wxMathGL: void ExportPNGs (QString fname="")

Export current picture to PNG file (no transparency).

Method on wxMathGL: void ExportJPG (QString fname="")

Export current picture to JPEG file.

Method on wxMathGL: void ExportBPS (QString fname="")

Export current picture to bitmap EPS file.

Method on wxMathGL: void ExportEPS (QString fname="")

Export current picture to vector EPS file.

Method on wxMathGL: void ExportSVG (QString fname="")

Export current picture to SVG file.