Class is WX widget which display MathGL graphics. It is defined in #include <mgl2/wx.h>
.
wxMathGL
: void
SetDraw (mglDraw *
dr)
¶Sets drawing functions from a class inherited from mglDraw
.
wxMathGL
: void
SetDraw (int (*
draw)(mglBase *
gr, void *
p)
, void *
par=NULL
)
¶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.
wxMathGL
: void
SetGraph (HMGL
gr)
¶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.
wxMathGL
: HMGL
GetGraph ()
¶Get pointer to grapher.
wxMathGL
: void
SetPopup (wxMenu *
p)
¶Set popup menu pointer.
wxMathGL
: void
SetSize (int
w, int
h)
¶Set widget/picture sizes
wxMathGL
: double
GetRatio ()
¶Return aspect ratio of the picture.
wxMathGL
: int
GetPer ()
¶Get perspective value in percents.
wxMathGL
: int
GetPhi ()
¶Get Phi-angle value in degrees.
wxMathGL
: int
GetTet ()
¶Get Theta-angle value in degrees.
wxMathGL
: bool
GetAlpha ()
¶Get transparency state.
wxMathGL
: bool
GetLight ()
¶Get lightning state.
wxMathGL
: bool
GetZoom ()
¶Get mouse zooming state.
wxMathGL
: bool
GetRotate ()
¶Get mouse rotation state.
wxMathGL
: void
Repaint ()
¶Redraw saved bitmap without executing drawing function.
wxMathGL
: void
Update ()
¶Update picture by executing drawing function.
wxMathGL
: void
Copy ()
¶Copy graphics to clipboard.
wxMathGL
: void
Print ()
¶Print current picture.
wxMathGL
: void
Adjust ()
¶Adjust image size to fit whole widget.
wxMathGL
: void
NextSlide ()
¶Show next slide.
wxMathGL
: void
PrevSlide ()
¶Show previous slide.
wxMathGL
: void
Animation (bool
st=true
)
¶Start/stop animation.
wxMathGL
: void
SetPer (int
val)
¶Set perspective value.
wxMathGL
: void
SetPhi (int
val)
¶Set Phi-angle value.
wxMathGL
: void
SetTet (int
val)
¶Set Theta-angle value.
wxMathGL
: void
SetAlpha (bool
val)
¶Switch on/off transparency.
wxMathGL
: void
SetLight (bool
val)
¶Switch on/off lightning.
wxMathGL
: void
SetZoom (bool
val)
¶Switch on/off mouse zooming.
wxMathGL
: void
SetRotate (bool
val)
¶Switch on/off mouse rotation.
wxMathGL
: void
ZoomIn ()
¶Zoom in graphics.
wxMathGL
: void
ZoomOut ()
¶Zoom out graphics.
wxMathGL
: void
ShiftLeft ()
¶Shift graphics to left direction.
wxMathGL
: void
ShiftRight ()
¶Shift graphics to right direction.
wxMathGL
: void
ShiftUp ()
¶Shift graphics to up direction.
wxMathGL
: void
ShiftDown ()
¶Shift graphics to down direction.
wxMathGL
: void
Restore ()
¶Restore zoom and rotation to default values.
wxMathGL
: void
About ()
¶Show about information.
wxMathGL
: void
ExportPNG (QString
fname=""
)
¶Export current picture to PNG file.
wxMathGL
: void
ExportPNGs (QString
fname=""
)
¶Export current picture to PNG file (no transparency).
wxMathGL
: void
ExportJPG (QString
fname=""
)
¶Export current picture to JPEG file.
wxMathGL
: void
ExportBPS (QString
fname=""
)
¶Export current picture to bitmap EPS file.
wxMathGL
: void
ExportEPS (QString
fname=""
)
¶Export current picture to vector EPS file.
wxMathGL
: void
ExportSVG (QString
fname=""
)
¶Export current picture to SVG file.