libsxbp  v0.27
Experimental generation of 2D spiralling lines based on input binary data.
render.h
Go to the documentation of this file.
1 /*
2  * This source file forms part of libsxbp, a library which generates
3  * experimental 2D spiral-like shapes based on input binary data.
4  */
5 
22 #ifndef SAXBOPHONE_SAXBOSPIRAL_RENDER_H
23 #define SAXBOPHONE_SAXBOSPIRAL_RENDER_H
24 
25 #include <stdbool.h>
26 #include <stdint.h>
27 
28 #include "saxbospiral.h"
29 
30 
31 #ifdef __cplusplus
32 extern "C"{
33 #endif
34 
40 typedef struct sxbp_bitmap_t {
42  uint32_t width;
44  uint32_t height;
49  bool** pixels;
51 
67  sxbp_spiral_t spiral, sxbp_bitmap_t* image
68 );
69 
104  sxbp_spiral_t spiral, sxbp_buffer_t* buffer,
105  sxbp_status_t(* image_writer_callback)(
106  sxbp_bitmap_t image, sxbp_buffer_t* buffer
107  )
108 );
109 
110 #ifdef __cplusplus
111 } // extern "C"
112 #endif
113 
114 // end of header file
115 #endif
This compilation unit provides most of the data types used by the library, as well as defining some l...
struct sxbp_bitmap_t sxbp_bitmap_t
Used to represent a basic 1-bit, pure black/white bitmap image.
uint32_t height
The height of the bitmap in pixels.
Definition: render.h:44
sxbp_status_t sxbp_render_spiral_image(sxbp_spiral_t spiral, sxbp_buffer_t *buffer, sxbp_status_t(*image_writer_callback)(sxbp_bitmap_t image, sxbp_buffer_t *buffer))
Renders the line of a spiral to an image format.
Definition: render.c:143
bool ** pixels
A 2-dimensional array of pixels.
Definition: render.h:49
Used to represent a basic 1-bit, pure black/white bitmap image.
Definition: render.h:40
A simple buffer type for storing arrays of bytes.
Definition: saxbospiral.h:236
uint32_t width
The width of the bitmap in pixels.
Definition: render.h:42
Struct type representing a Spiral figure, in any state of completion.
Definition: saxbospiral.h:189
sxbp_status_t sxbp_render_spiral_raw(sxbp_spiral_t spiral, sxbp_bitmap_t *image)
Renders the line of a spiral to a bitmap.
Definition: render.c:65
sxbp_status_t
Represents the success or failure status of an executed function.
Definition: saxbospiral.h:87