#ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN 1 #include #endif #include #include "funcs.h" #include "palette.h" #include "template.h" static int template_render = FALSE; static int template_num_colors = PALETTE_MAXCOLORS; static int template_colormap = PALETTE_BLACKWHITE; static float template_alpha = 1.0f; static fftw_real *template_frame; void _set_render(int render_template) { template_render = render_template; } int template_get_render(void) { return template_render; } void template_set_num_colors(int num_colors) { template_num_colors = num_colors; } int template_get_num_colors(void) { return template_num_colors; } void template_set_colormap(int colormap) { template_colormap = colormap; } int template_get_colormap(void) { return template_colormap; } void template_set_alpha(float alpha) { template_alpha = alpha; } float template_get_alpha(void) { return template_alpha; } void template_set_frame(fftw_real *frame) { template_frame = frame; } fftw_real *template_get_frame(void) { return template_frame; } struct color4f template_get_color(float value) { struct color4f return_value; return_value = set_palette(template_colormap, value, template_num_colors); return_value.a = template_alpha; return return_value; }