FB Graphics
FBGraphics (FBG) : Simple C 16, 24, 32 bpp generic graphics library with parallelism support and custom backend.
|
FB Graphics context data structure. More...
#include <fbgraphics.h>
Data Fields | |
int | size |
Framebuffer real data length (with BPP) More... | |
unsigned char * | disp_buffer |
Front / display buffer. More... | |
unsigned char * | back_buffer |
Back buffer. More... | |
unsigned char * | temp_buffer |
Temporary buffer. More... | |
int | allow_resizing |
Wether to allow context resize. More... | |
int | initialize_buffers |
Wether to allow FBG to allocate its internal buffers. More... | |
struct _fbg_rgb | fill_color |
Current fill color. More... | |
struct _fbg_rgb | text_color |
Current text color. More... | |
struct _fbg_rgb | text_background |
Current text background color (based on colorkey value) More... | |
unsigned char | text_colorkey |
Current text color key. More... | |
int | text_alpha |
Text background alpha value. More... | |
struct _fbg_font | current_font |
Current font. More... | |
int | compositing |
Compositing method (only used with fbg_drawImage for now) More... | |
int | width |
Display width in pixels. More... | |
int | height |
Display height in pixels. More... | |
int | width_n_height |
Display lenght in pixels (width * height) More... | |
int | components |
Display components amount (3 = 24 BPP / 4 = 32 BPP) More... | |
int | comp_offset |
Offset to add in case of 32 BPP. More... | |
int | line_length |
Internal buffers line length. More... | |
int | new_width |
Requested new display width (resize event) More... | |
int | new_height |
Requested new display height (resize event) More... | |
int16_t | fps |
Current FPS. More... | |
char | fps_char [10] |
Current FPS as a string. More... | |
struct timeval | fps_start |
First frame time for the current second. More... | |
struct timeval | fps_stop |
Last frame time for the current second. More... | |
int | frame |
Frame counter for the current second. More... | |
int | bgr |
Flag indicating a BGR framebuffer. More... | |
void(* | backend_resize )(struct _fbg *fbg, unsigned int new_width, unsigned int new_height) |
Backend resize function. More... | |
void(* | user_resize )(struct _fbg *fbg, unsigned int new_width, unsigned int new_height) |
User-defined resize function. More... | |
void(* | user_flip )(struct _fbg *fbg) |
User-defined flip function. More... | |
void(* | user_draw )(struct _fbg *fbg) |
User-defined draw function. More... | |
void(* | user_free )(struct _fbg *fbg) |
User-defined free function. More... | |
void * | user_context |
User-defined context structure. More... | |
FB Graphics context data structure.
Hold all data related to a FBG context
Definition at line 123 of file fbgraphics.h.
int _fbg::allow_resizing |
Wether to allow context resize.
Definition at line 136 of file fbgraphics.h.
unsigned char* _fbg::back_buffer |
Back buffer.
All FB Graphics functions draw into this buffer.
Definition at line 131 of file fbgraphics.h.
void(* _fbg::backend_resize) (struct _fbg *fbg, unsigned int new_width, unsigned int new_height) |
Backend resize function.
Definition at line 209 of file fbgraphics.h.
int _fbg::bgr |
Flag indicating a BGR framebuffer.
Definition at line 206 of file fbgraphics.h.
int _fbg::comp_offset |
Offset to add in case of 32 BPP.
Definition at line 178 of file fbgraphics.h.
int _fbg::components |
Display components amount (3 = 24 BPP / 4 = 32 BPP)
Definition at line 176 of file fbgraphics.h.
int _fbg::compositing |
Compositing method (only used with fbg_drawImage for now)
Default to source-over compositing.
Definition at line 167 of file fbgraphics.h.
struct _fbg_font _fbg::current_font |
Current font.
No fonts is loaded by default and the first loaded font will be assigned automatically as the current font.
Definition at line 163 of file fbgraphics.h.
unsigned char* _fbg::disp_buffer |
Front / display buffer.
Definition at line 128 of file fbgraphics.h.
struct _fbg_rgb _fbg::fill_color |
int16_t _fbg::fps |
Current FPS.
Definition at line 191 of file fbgraphics.h.
char _fbg::fps_char[10] |
Current FPS as a string.
Definition at line 195 of file fbgraphics.h.
struct timeval _fbg::fps_start |
First frame time for the current second.
Definition at line 198 of file fbgraphics.h.
struct timeval _fbg::fps_stop |
Last frame time for the current second.
Definition at line 200 of file fbgraphics.h.
int _fbg::frame |
Frame counter for the current second.
Definition at line 203 of file fbgraphics.h.
int _fbg::height |
Display height in pixels.
Definition at line 172 of file fbgraphics.h.
int _fbg::initialize_buffers |
Wether to allow FBG to allocate its internal buffers.
Definition at line 139 of file fbgraphics.h.
int _fbg::line_length |
Internal buffers line length.
Definition at line 180 of file fbgraphics.h.
int _fbg::new_height |
Requested new display height (resize event)
Definition at line 185 of file fbgraphics.h.
int _fbg::new_width |
Requested new display width (resize event)
Definition at line 183 of file fbgraphics.h.
int _fbg::size |
Framebuffer real data length (with BPP)
Definition at line 125 of file fbgraphics.h.
unsigned char* _fbg::temp_buffer |
Temporary buffer.
Definition at line 133 of file fbgraphics.h.
int _fbg::text_alpha |
struct _fbg_rgb _fbg::text_background |
Current text background color (based on colorkey value)
Default to black.
Definition at line 151 of file fbgraphics.h.
struct _fbg_rgb _fbg::text_color |
unsigned char _fbg::text_colorkey |
void* _fbg::user_context |
User-defined context structure.
Definition at line 219 of file fbgraphics.h.
void(* _fbg::user_draw) (struct _fbg *fbg) |
User-defined draw function.
Definition at line 215 of file fbgraphics.h.
void(* _fbg::user_flip) (struct _fbg *fbg) |
User-defined flip function.
Definition at line 213 of file fbgraphics.h.
void(* _fbg::user_free) (struct _fbg *fbg) |
User-defined free function.
Definition at line 217 of file fbgraphics.h.
void(* _fbg::user_resize) (struct _fbg *fbg, unsigned int new_width, unsigned int new_height) |
User-defined resize function.
Definition at line 211 of file fbgraphics.h.
int _fbg::width |
Display width in pixels.
Definition at line 170 of file fbgraphics.h.
int _fbg::width_n_height |
Display lenght in pixels (width * height)
Definition at line 174 of file fbgraphics.h.