|
NetSurf
|
Framebuffer implementation of generic bitmap interface. More...
#include <inttypes.h>#include <sys/types.h>#include <stdbool.h>#include <assert.h>#include <libnsfb.h>#include <libnsfb_plot.h>#include "utils/log.h"#include "utils/utils.h"#include "netsurf/bitmap.h"#include "netsurf/plotters.h"#include "netsurf/content.h"#include "framebuffer/gui.h"#include "framebuffer/fbtk.h"#include "framebuffer/framebuffer.h"#include "framebuffer/bitmap.h"Go to the source code of this file.
Functions | |
| static void * | bitmap_create (int width, int height, enum gui_bitmap_flags flags) |
| Create a bitmap. More... | |
| static unsigned char * | bitmap_get_buffer (void *bitmap) |
| Return a pointer to the pixel data in a bitmap. More... | |
| static size_t | bitmap_get_rowstride (void *bitmap) |
| Find the width of a pixel row in bytes. More... | |
| static void | bitmap_destroy (void *bitmap) |
| Free a bitmap. More... | |
| static void | bitmap_modified (void *bitmap) |
| The bitmap image has changed, so flush any persistant cache. More... | |
| static void | bitmap_set_opaque (void *bitmap, bool opaque) |
| Sets wether a bitmap should be plotted opaque. More... | |
| bool | framebuffer_bitmap_get_opaque (void *bitmap) |
| Gets weather a bitmap should be plotted opaque. More... | |
| static int | bitmap_get_width (void *bitmap) |
| static int | bitmap_get_height (void *bitmap) |
| static nserror | bitmap_render (struct bitmap *bitmap, struct hlcache_handle *content) |
| Render content into a bitmap. More... | |
Variables | |
| static struct gui_bitmap_table | bitmap_table |
| struct gui_bitmap_table * | framebuffer_bitmap_table = &bitmap_table |
Framebuffer implementation of generic bitmap interface.
Definition in file bitmap.c.
|
static |
Create a bitmap.
| width | width of image in pixels |
| height | width of image in pixels |
| state | a flag word indicating the initial state |
Definition at line 50 of file bitmap.c.
References BITMAP_OPAQUE, height, and width.
|
static |
Free a bitmap.
| bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 120 of file bitmap.c.
References bitmap().
|
static |
Return a pointer to the pixel data in a bitmap.
| bitmap | a bitmap, as returned by bitmap_create() |
The pixel data is packed as BITMAP_FORMAT, possibly with padding at the end of rows. The width of a row in bytes is given by bitmap_get_rowstride().
Definition at line 83 of file bitmap.c.
References bitmap().
|
static |
|
static |
Find the width of a pixel row in bytes.
| bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 102 of file bitmap.c.
References bitmap().
|
static |
|
static |
The bitmap image has changed, so flush any persistant cache.
| bitmap | a bitmap, as returned by bitmap_create() |
|
static |
Render content into a bitmap.
| bitmap | the bitmap to draw to |
| content | content structure to render |
Definition at line 210 of file bitmap.c.
References content_get_width(), content_scaled_redraw(), fb_plotters, framebuffer_set_surface(), height, redraw_context::interactive, max, min, NSERROR_NOMEM, NSERROR_OK, NSLOG, and width.
|
static |
Sets wether a bitmap should be plotted opaque.
| bitmap | a bitmap, as returned by bitmap_create() |
| opaque | whether the bitmap should be plotted opaque |
Definition at line 144 of file bitmap.c.
References bitmap().
| bool framebuffer_bitmap_get_opaque | ( | void * | bitmap | ) |
Gets weather a bitmap should be plotted opaque.
| bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 163 of file bitmap.c.
References bitmap().
Referenced by framebuffer_plot_bitmap().
|
static |
| struct gui_bitmap_table* framebuffer_bitmap_table = &bitmap_table |