visu_dumpvisu_dump — Some resources to add the ability to export the rendered data to an other format (usually image format). |
Synopsis
VisuDump; VisuDumpClass; enum VisuDumpErrorFlag; const VisuDump * (*VisuDumpInitFunc) ();gboolean (*VisuDumpWriteFunc) (ToolFileFormat *format,const,char *fileName,int width,int heightVisuData *dataObj,,guchar *image,GError **error,ToolVoidDataFunc functionWait);gpointer datavoid visu_dump_abort (,GObject *obj);gpointer dataGList * visu_dump_getAllModules ();gboolean visu_dump_getAlphaStatus (VisuDump *dump);gboolean visu_dump_getBitmapStatus (VisuDump *dump);gboolean visu_dump_getGlStatus (VisuDump *dump);gint visu_dump_getNModules ();GQuark visu_dump_getQuark (); VisuDump * visu_dump_new (const,gchar *descrconst,gchar **patternsVisuDumpWriteFunc method,);gboolean bitmapvoid visu_dump_setGl (VisuDump *dump,);gboolean needGlvoid visu_dump_setHasAlpha (VisuDump *dump,);gboolean hasAlphagboolean visu_dump_write (VisuDump *dump,const,char *fileName,int width,int heightVisuData *dataObj,,GArray *image,ToolVoidDataFunc functionWait,gpointer data);GError **error
Description
V_Sim can export loaded data to othe formats. This module
descibes the methods and structure to create a dumping
extension. Basically, a dumping extension is just a
The waitFunction should be called exactly
100 times.
Details
enum VisuDumpErrorFlag
typedef enum {
DUMP_ERROR_OPENGL,
DUMP_ERROR_FILE,
DUMP_ERROR_ENCODE
} VisuDumpErrorFlag;
These are flags used when dumping to a file.
VisuDumpInitFunc ()
const VisuDump * (*VisuDumpInitFunc) ();
This protoype defines initializing function for dumping extension.
Create such a function and add its name in the list
Returns : |
a newly allocated VisuDump. |
VisuDumpWriteFunc ()
gboolean (*VisuDumpWriteFunc) (ToolFileFormat *format,const,char *fileName,int width,int heightVisuData *dataObj,,guchar *image,GError **error,ToolVoidDataFunc functionWait);gpointer data
This is a prototype of a method implemented by a dumping extension that is called when the current rendering must be dumped to a file.
|
a ToolFileFormat object, corresponding to the write method ; |
|
a string that defined the file to write to ; |
|
an integer ; |
|
an integer. |
|
the VisuData to be exported ; |
|
the data to be written ; |
|
a location to store some error (not NULL) ;. [allow-none] |
|
a method to call periodically during the dump ;. [allow-none][scope call] |
|
some pointer on object to be passed to the wait function. [closure] |
Returns : |
TRUE if everything went right. |
visu_dump_abort ()
void visu_dump_abort (,GObject *obj);gpointer data
Does nothing for the moment.
|
an object ; |
|
some data. |
visu_dump_getAllModules ()
GList * visu_dump_getAllModules ();
All dumping extensions are stored in an opaque way in V_Sim. But they can be listed by a call to this method.
Returns : |
a list of all the known dumping extensions. This list is own by V_Sim and should be considered read-only. [transfer none][element-type VisuDump*] |
visu_dump_getAlphaStatus ()
gboolean visu_dump_getAlphaStatus (VisuDump *dump);
Retrieve if dump use alpha channel or not.
|
a VisuDump method. |
Returns : |
TRUE if dump has an alpha channel. |
visu_dump_getBitmapStatus ()
gboolean visu_dump_getBitmapStatus (VisuDump *dump);
Retrieve if dump is exporting a bitmap or not (like to a new input
file format...).
|
a VisuDump method. |
Returns : |
TRUE if the output is a bitmap indeed. |
visu_dump_getGlStatus ()
gboolean visu_dump_getGlStatus (VisuDump *dump);
Retrieve if dump requires OpenGL to export or not.
|
a VisuDump method. |
Returns : |
TRUE if OpenGL is required. |
visu_dump_getNModules ()
gint visu_dump_getNModules ();
A convenient way to know how many dumping extensions are registered.
Returns : |
the number of known dumping extensions. |
visu_dump_getQuark ()
GQuark visu_dump_getQuark ();
Internal routine to get the
visu_dump_new ()
VisuDump * visu_dump_new (const,gchar *descrconst,gchar **patternsVisuDumpWriteFunc method,);gboolean bitmap
Create a new dump format.
|
an UTF8 translated string ; |
|
a NULL terminated list of pattern for this dump format ;. [array zero-terminated=1] |
|
a method used to dump the current VisuData ;. [scope call] |
|
a flag for bitmap export. |
Returns : |
a newly created dump format. |
Since 3.7
visu_dump_setGl ()
void visu_dump_setGl (VisuDump *dump,);gboolean needGl
Set if dump requires OpenGL or not.
|
a VisuDump method. |
|
a boolean |
visu_dump_setHasAlpha ()
void visu_dump_setHasAlpha (VisuDump *dump,);gboolean hasAlpha
Set if dump has an alpha channel or not.
|
a VisuDump method. |
|
a boolean. |
visu_dump_write ()
gboolean visu_dump_write (VisuDump *dump,const,char *fileName,int width,int heightVisuData *dataObj,,GArray *image,ToolVoidDataFunc functionWait,gpointer data);GError **error
Use the write function of dump to export the current dataObj to
file fileName.
|
a VisuDump object ; |
|
a string that defined the file to write to ;. [type filename] |
|
an integer ; |
|
an integer ; |
|
the VisuData to be exported ; |
|
the data to be written ;. [allow-none][element-type gint8] |
|
a location to store some error (not NULL) ; |
|
a method to call periodically during the dump ;. [allow-none][closure data][scope call] |
|
some pointer on object to be passed to the wait function. [closure] |
Returns : |
TRUE if dump succeed. |
Since 3.6
