NetSurf
|
win32 implementation of the bitmap operations. More...
#include "utils/config.h"
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
#include <windows.h>
#include "utils/log.h"
#include "netsurf/bitmap.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
#include "windows/plot.h"
#include "windows/bitmap.h"
Go to the source code of this file.
Functions | |
static void * | win32_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... | |
void | win32_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 whether a bitmap should be plotted opaque. More... | |
static bool | bitmap_get_opaque (void *bitmap) |
Gets whether a bitmap should be plotted opaque. More... | |
static int | bitmap_get_width (void *bitmap) |
static int | bitmap_get_height (void *bitmap) |
struct bitmap * | bitmap_scale (struct bitmap *prescale, int width, int height) |
static nserror | bitmap_render (struct bitmap *bitmap, struct hlcache_handle *content) |
Variables | |
static struct gui_bitmap_table | bitmap_table |
struct gui_bitmap_table * | win32_bitmap_table = &bitmap_table |
win32 implementation of the bitmap operations.
Definition in file bitmap.c.
|
static |
Return a pointer to the pixel data in a bitmap.
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().
bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 115 of file bitmap.c.
References bitmap(), NSLOG, and bitmap::pixdata.
|
static |
Definition at line 224 of file bitmap.c.
References bitmap(), bitmap::height, and NSLOG.
|
static |
Gets whether a bitmap should be plotted opaque.
bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 200 of file bitmap.c.
References bitmap(), NSLOG, and bitmap::opaque.
|
static |
Find the width of a pixel row in bytes.
bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 133 of file bitmap.c.
References bitmap(), NSLOG, and bitmap::width.
|
static |
Definition at line 212 of file bitmap.c.
References bitmap(), NSLOG, and bitmap::width.
|
static |
The bitmap image has changed, so flush any persistant cache.
bitmap | a bitmap, as returned by bitmap_create() |
|
static |
Definition at line 269 of file bitmap.c.
References BITMAP_CLEAR, BITMAP_OPAQUE, content_get_width(), content_scaled_redraw(), bitmap::height, height, redraw_context::interactive, max, min, NSERROR_NOMEM, NSERROR_OK, NSLOG, bitmap::opaque, plot_hdc, bitmap::width, width, win32_bitmap_create(), win32_bitmap_destroy(), win_plotters, and bitmap::windib.
Definition at line 236 of file bitmap.c.
References bitmap::height, height, bitmap::pixdata, bitmap::width, and width.
Referenced by plot_alpha_bitmap().
|
static |
Sets whether 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 180 of file bitmap.c.
References bitmap(), NSLOG, and bitmap::opaque.
|
static |
Create a bitmap.
width | width of image in pixels |
height | height of image in pixels |
state | flags flags for bitmap creation |
Definition at line 48 of file bitmap.c.
References bitmap(), BITMAP_OPAQUE, bitmap::height, height, NSLOG, bitmap::opaque, bitmap::pbmi, bitmap::pixdata, bitmap::width, width, and bitmap::windib.
Referenced by bitmap_render().
void win32_bitmap_destroy | ( | void * | bitmap | ) |
Free a bitmap.
bitmap | a bitmap, as returned by bitmap_create() |
Definition at line 151 of file bitmap.c.
References bitmap(), NSLOG, bitmap::pbmi, and bitmap::windib.
Referenced by bitmap_render().
|
static |
struct gui_bitmap_table* win32_bitmap_table = &bitmap_table |