render_struct.h
author Tero Marttila <terom@fixme.fi>
Sat, 30 Aug 2008 19:13:15 +0300
changeset 49 10c7dce1a043
parent 22 4627760fc0d1
permissions -rw-r--r--
autogenerate the memcache_test help output, and pipeline memcache requests
#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;

/* render region */
    u_int32_t img_left, img_right, img_top, img_bottom;
    u_int32_t img_x_step, img_y_step;

/* 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 */