| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.5.1 Export to file
These functions export current view to a graphic file. The filename fname should have appropriate extension. Parameter descr gives the short description of the picture. Just now the transparency is supported in PNG, SVG, OBJ and PRC files.
- MGL command: write ['fname'='']
- Method on
mglGraph:voidWriteFrame (const char *fname="",const char *descr="") - C function:
voidmgl_write_frame (HMGLgr,const char *fname,const char *descr) Exports current frame to a file fname which type is determined by the extension. Parameter descr adds description to file (can be
""). If fname=""then the file ‘frame####.jpg’ is used, where ‘####’ is current frame id and name ‘frame’ is defined by plotid class property.
- Method on
mglGraph:voidWritePNG (const char *fname,const char *descr="",intcompr="",boolalpha=true) - C function:
voidmgl_write_png (HMGLgr,const char *fname,const char *descr) - C function:
voidmgl_write_png_solid (HMGLgr,const char *fname,const char *descr) Exports current frame to PNG file. Parameter fname specifies the file name, descr adds description to file, alpha gives the transparency type. By default there are no description added and semitransparent image used. This function does nothing if HAVE_PNG isn’t defined during compilation of MathGL library.
- Method on
mglGraph:voidWriteJPEG (const char *fname,const char *descr="") - C function:
voidmgl_write_jpg (HMGLgr,const char *fname,const char *descr) Exports current frame to JPEG file. Parameter fname specifies the file name, descr adds description to file. By default there is no description added. This function does nothing if HAVE_JPEG isn’t defined during compilation of MathGL library.
- Method on
mglGraph:voidWriteGIF (const char *fname,const char *descr="") - C function:
voidmgl_write_gif (HMGLgr,const char *fname,const char *descr) Exports current frame to GIF file. Parameter fname specifies the file name, descr adds description to file. By default there is no description added. This function does nothing if HAVE_GIF isn’t defined during compilation of MathGL library.
- Method on
mglGraph:voidWriteBMP (const char *fname,const char *descr="") - C function:
voidmgl_write_bmp (HMGLgr,const char *fname,const char *descr) Exports current frame to BMP file. Parameter fname specifies the file name, descr adds description to file. There is no compression used.
- Method on
mglGraph:voidWriteTGA (const char *fname,const char *descr="") - C function:
voidmgl_write_tga (HMGLgr,const char *fname,const char *descr) Exports current frame to TGA file. Parameter fname specifies the file name, descr adds description to file. There is no compression used.
- Method on
mglGraph:voidWriteEPS (const char *fname,const char *descr="") - C function:
voidmgl_write_eps (HMGLgr,const char *fname,const char *descr) Exports current frame to EPS file using vector representation. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file. By default there is no description added. If file name is terminated by ‘z’ (for example, ‘fname.eps.gz’) then file will be compressed in gzip format.
- Method on
mglGraph:voidWriteBPS (const char *fname,const char *descr="") - C function:
voidmgl_write_eps (HMGLgr,const char *fname,const char *descr) Exports current frame to EPS file using bitmap representation. Parameter fname specifies the file name, descr adds description to file. By default there is no description added. If file name is terminated by ‘z’ (for example, ‘fname.eps.gz’) then file will be compressed in gzip format.
- Method on
mglGraph:voidWriteSVG (const char *fname,const char *descr="") - C function:
voidmgl_write_svg (HMGLgr,const char *fname,const char *descr) Exports current frame to SVG (Scalable Vector Graphics) file using vector representation. In difference of EPS format, SVG format support transparency that allows to correctly draw semitransparent plot (like surfa, surf3a or cloud). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name). If file name is terminated by ‘z’ (for example, ‘fname.svgz’) then file will be compressed in gzip format.
- Method on
mglGraph:voidWriteTEX (const char *fname,const char *descr="") - C function:
voidmgl_write_tex (HMGLgr,const char *fname,const char *descr) Exports current frame to LaTeX (package Tikz/PGF) file using vector representation. Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name). Note, there is no text scaling now (for example, in subplots), what may produce miss-aligned labels.
- Method on
mglGraph:voidWritePRC (const char *fname,const char *descr="",boolmake_pdf=true) - C function:
voidmgl_write_prc (HMGLgr,const char *fname,const char *descr,intmake_pdf) Exports current frame to PRC file using vector representation (see http://en.wikipedia.org/wiki/PRC_%28file_format%29). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name). If parameter make_pdf=
trueand PDF was enabled at MathGL configure then corresponding PDF file with 3D image will be created.
- Method on
mglGraph:voidWriteOBJ (const char *fname,const char *descr="") - C function:
voidmgl_write_obj (HMGLgr,const char *fname,const char *descr) Exports current frame to OBJ/MTL file using vector representation (see OBJ format for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name).
- Method on
mglGraph:voidWriteXYZ (const char *fname,const char *descr="") - C function:
voidmgl_write_xyz (HMGLgr,const char *fname,const char *descr) Exports current frame to XYZ/XYZL/XYZF files using vector representation (see XYZ format for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name).
- Method on
mglGraph:voidWriteSTL (const char *fname,const char *descr="") - C function:
voidmgl_write_stl (HMGLgr,const char *fname,const char *descr) Exports current frame to STL file using vector representation (see STL format for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name.
- Method on
mglGraph:voidWriteOFF (const char *fname,const char *descr="",boolcolored=false) - C function:
voidmgl_write_off (HMGLgr,const char *fname,const char *descr,boolcolored) Exports current frame to OFF file using vector representation (see OFF format for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter fname specifies the file name, descr adds description to file (default is file name).
- Method on
mglGraph:voidShowImage (const char *viewer,boolnowait=false) - C function:
voidmgl_show_image (const char *viewer,intnowait) Displays the current picture using external program viewer for viewing. The function save the picture to temporary file and call viewer to display it. If nowait=
truethen the function return immediately (it will not wait while window will be closed).
- Method on
mglGraph:voidWriteJSON (const char *fname,const char *descr="") - C function:
voidmgl_write_json (HMGLgr,const char *fname,const char *descr) Exports current frame to textual file using JSON format. Later this file can be used for faster loading and viewing by JavaScript script. Parameter fname specifies the file name, descr adds description to file.
- Method on
mglGraph:voidExportMGLD (const char *fname,const char *descr="") - C function:
voidmgl_export_mgld (HMGLgr,const char *fname,const char *descr) Exports points and primitives in file using MGLD format. Later this file can be used for faster loading and viewing by
mglviewutility. Parameter fname specifies the file name, descr adds description to file (default is file name).
- Method on
mglGraph:voidImportMGLD (const char *fname,booladd=false) - C function:
voidmgl_import_mgld (HMGLgr,const char *fname,intadd) Imports points and primitives in file using MGLD format. Later this file can be used for faster loading and viewing by
mglviewutility. Parameter fname specifies the file name, add sets to append or replace primitives to existed ones.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
