29#include <libnsfb_plot.h>
54 bm = nsfb_new(NSFB_SURFACE_RAM);
60 nsfb_set_geometry(bm,
width,
height, NSFB_FMT_ABGR8888);
62 nsfb_set_geometry(bm,
width,
height, NSFB_FMT_XBGR8888);
65 if (nsfb_init(bm) == -1) {
86 unsigned char *bmpptr;
90 nsfb_get_buffer(bm, &bmpptr, NULL);
109 nsfb_get_buffer(bm, NULL, &bmpstride);
151 nsfb_set_geometry(bm, 0, 0, NSFB_FMT_XBGR8888);
153 nsfb_set_geometry(bm, 0, 0, NSFB_FMT_ABGR8888);
166 enum nsfb_format_e format;
170 nsfb_get_geometry(bm, NULL, NULL, &format);
172 if (format == NSFB_FMT_ABGR8888)
185 nsfb_get_geometry(bm, &
width, NULL, NULL);
197 nsfb_get_geometry(bm, NULL, &
height, NULL);
213 nsfb_t *tbm = (nsfb_t *)
bitmap;
222 .background_images =
true,
241 bm = nsfb_new(NSFB_SURFACE_RAM);
246 nsfb_set_geometry(bm, cwidth, cheight, NSFB_FMT_XBGR8888);
248 if (nsfb_init(bm) == -1) {
265 nsfb_plot_copy(bm, NULL, tbm, &loc);
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
const struct plotter_table fb_plotters
framebuffer plot operation table
nsfb_t * framebuffer_set_surface(nsfb_t *new_nsfb)
Set framebuffer surface to render into.
int bitmap_get_width(void *bitmap)
get width of a bitmap.
int bitmap_get_height(void *bitmap)
get height of a bitmap.
static struct gui_bitmap_table bitmap_table
static void bitmap_modified(void *bitmap)
The bitmap image has changed, so flush any persistant cache.
struct gui_bitmap_table * framebuffer_bitmap_table
static size_t bitmap_get_rowstride(void *bitmap)
Find the width of a pixel row in bytes.
static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
Render content into a bitmap.
static unsigned char * bitmap_get_buffer(void *bitmap)
Return a pointer to the pixel data in a bitmap.
static void bitmap_set_opaque(void *bitmap, bool opaque)
Sets wether a bitmap should be plotted opaque.
static void * bitmap_create(int width, int height, enum gui_bitmap_flags flags)
Create a bitmap.
bool framebuffer_bitmap_get_opaque(void *bitmap)
Gets weather a bitmap should be plotted opaque.
static void bitmap_destroy(void *bitmap)
Free a bitmap.
Generic bitmap handling interface.
gui_bitmap_flags
Bitmap creation flags.
@ BITMAP_OPAQUE
image is opaque
Public content interface.
int content_get_width(struct hlcache_handle *h)
Retrieve width of content.
bool content_scaled_redraw(struct hlcache_handle *h, int width, int height, const struct redraw_context *ctx)
Redraw a content with scale set for horizontal fit.
Target independent plotting interface.
Netsurf additional integer type formatting macros.
#define NSLOG(catname, level, logmsg, args...)
RISC OS wimp toolkit bitmap.
Content which corresponds to a single URL.
void *(* create)(int width, int height, enum gui_bitmap_flags flags)
Create a new bitmap.
bool interactive
Redraw to show interactive features.
Interface to a number of general purpose functionality.
static nserror bitmap(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
Plot a bitmap.