render_struct.h
changeset 17 8e8b56b0e0f5
child 22 4627760fc0d1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/render_struct.h	Mon Jun 09 03:15:34 2008 +0300
@@ -0,0 +1,39 @@
+#ifndef RENDER_STRUCT_H
+#define RENDER_STRUCT_H
+
+#include "render.h"
+
+struct render {
+/* render mode */
+    int mode;
+
+/* image size */
+    u_int32_t img_w;
+    u_int32_t img_h;
+
+/* mandelbrot region */
+    double      x1;
+    double      y1;
+    double      x2;
+    double      y2;
+
+/* local rendering */
+    unsigned char **local_rowbuf_addr;
+    render_ctx_row_cb local_row_fn;
+
+/* local I/O parameters */
+    // if this is non-NULL, the image data is simply fwrite():en to this stream
+    FILE *io_stream;
+
+    // called to handle the output data
+    render_ctx_write_cb io_write_fn;
+
+    // called when the output data should be flushed - can be safely ignored if not needed
+    render_ctx_flush_cb io_flush_fn;
+
+    // the callback argument for all of the above *_fn
+    void *cb_arg;
+};
+
+#endif /* RENDER_STRUCT_H */
+