summaryrefslogtreecommitdiff
path: root/graymap_alleg.h
diff options
context:
space:
mode:
authorKevin Chabowski <der.pc222@googlemail.com>2010-07-28 23:03:16 +0200
committerKevin Chabowski <der.pc222@googlemail.com>2010-07-28 23:03:16 +0200
commit054a617a9375b835492368c3773315b09d3851ce (patch)
tree231d5e4a57e994e3cc3c0b005fea6fe2a4a9fcc9 /graymap_alleg.h
downloadAnother-mandelbrot-viewer-054a617a9375b835492368c3773315b09d3851ce.tar.gz
Another-mandelbrot-viewer-054a617a9375b835492368c3773315b09d3851ce.tar.bz2
Another-mandelbrot-viewer-054a617a9375b835492368c3773315b09d3851ce.zip
Initial commit for mandelbrot.
Diffstat (limited to 'graymap_alleg.h')
-rw-r--r--graymap_alleg.h37
1 files changed, 37 insertions, 0 deletions
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 <allegro.h>
+#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