bitlib_c
0.2.4
|
Go to the source code of this file.
Classes | |
struct | _bl_bl_log_display_data |
Typedefs | |
typedef struct _bl_bl_log_display_data | bl_log_display_data |
Functions | |
bl_log_display_data * | bl_make_log_display_data (double width, double height) |
void | bl_log_display_add (bl_log_display_data *data, double x, double y) |
double | bl_log_display_get_value (bl_log_display_data *data, double x, double y) |
typedef struct _bl_bl_log_display_data bl_log_display_data |
A structure to hold information about quantitative draws to a bitmap.
Rather than directly drawing each pixel, you mark it as hit in this data struct. When you are done markeing pixels, you can get the value for each pixel which will be calculated on a logarithmic scale based on the pixel that got the most hits.
void bl_log_display_add | ( | bl_log_display_data * | data, |
double | x, | ||
double | y | ||
) |
Marks a pixel as hit in a bl_log_display_data
instance.
Hits are cumulative and will later be scaled logarithmically.
bl_log_display_data | *data The bl_log_display_data to add to. |
double | x The x value of the pixel to add. |
double | y The y value of the pixel to add. |
Examples
bl_log_display_add(data, 100, 100);
double bl_log_display_get_value | ( | bl_log_display_data * | data, |
double | x, | ||
double | y | ||
) |
Gets the logarithmically scaled value for a pixel.
bl_log_display_data | *data The bl_log_display_data to retrieve a value from. |
double | x The x value of the pixel. |
double | y The y value of the pixel. returns double |
Examples
double value = bl_log_display_get_value(data, 100, 100);
bl_log_display_data* bl_make_log_display_data | ( | double | width, |
double | height | ||
) |
Creates an instance of bl_log_display_data
.
Be sure to free
the instance when you are done.
double | width The width of the bitmap you will be drawing to. |
double | height The height of the bitmap you will be drawing to. |
Examples
bl_log_display_data *data = bl_make_log_display_data(400, 400);