From 054a617a9375b835492368c3773315b09d3851ce Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 28 Jul 2010 23:03:16 +0200 Subject: Initial commit for mandelbrot. --- graymap_alleg.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 graymap_alleg.h (limited to 'graymap_alleg.h') diff --git a/graymap_alleg.h b/graymap_alleg.h new file mode 100644 index 0000000..87a35e7 --- /dev/null +++ b/graymap_alleg.h @@ -0,0 +1,37 @@ +#ifndef _graymap_alleg_h_ +#define _graymap_alleg_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file graymap_alleg.h + * + * This header file conatins a function to render graymaps to allegro 4 bitmaps. + */ +#include +#include "graymap.h" + +/** + * Render a graymap to a allegro 4 bitmap. + * + * A palette is represented by two arrays. One array contains colors, the other + * one contains the corresponding grayscale values. This palette now represents + * a color gradient. The color which fits to the grayscale value will be + * returned. + * + * @param canvas The allegro 4 bitmap. + * @param gm The graymap. + * @param pal_cols Array of colors. + * @param pal_grays Array of grayscale values + * @param pal_n length of the arrays. + */ +extern void render_graymap_alleg(BITMAP* canvas, graymap_t* gm, + color_t* pal_cols, double* pal_grays, int pal_n); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3-54-g00ecf