58 pbmi = calloc(1,
sizeof(BITMAPV5HEADER));
63 pbmi->bV5Size =
sizeof(BITMAPV5HEADER);
67 pbmi->bV5BitCount = 32;
68 pbmi->bV5Compression = BI_BITFIELDS;
70 pbmi->bV5RedMask = 0xff;
71 pbmi->bV5GreenMask = 0xff00;
72 pbmi->bV5BlueMask = 0xff0000;
73 pbmi->bV5AlphaMask = 0xff000000;
75 windib = CreateDIBSection(NULL, (BITMAPINFO *)
pbmi, DIB_RGB_COLORS, (
void **)&
pixdata, NULL, 0);
119 NSLOG(netsurf, INFO,
"NULL bitmap!");
138 NSLOG(netsurf, INFO,
"NULL bitmap!");
142 return (bm->
width) * 4;
156 NSLOG(netsurf, INFO,
"NULL bitmap!");
185 NSLOG(netsurf, INFO,
"NULL bitmap!");
189 NSLOG(netsurf, INFO,
"setting bitmap %p to %s", bm,
190 opaque ?
"opaque" :
"transparent");
205 NSLOG(netsurf, INFO,
"NULL bitmap!");
217 NSLOG(netsurf, INFO,
"NULL bitmap!");
229 NSLOG(netsurf, INFO,
"NULL bitmap!");
240 uint32_t *retpixdata, *inpixdata;
246 if (retpixdata == NULL) {
251 inpixdata = (uint32_t *)prescale->
pixdata;
252 ret->
pixdata = (uint8_t *)retpixdata;
255 for (i = 0; i <
height; i++) {
258 for (ii = 0; ii <
width; ii++) {
259 retpixdata[v + ii] = inpixdata[vv + (int)
273 HDC hdc, bufferdc, minidc;
277 .background_images =
true,
285 NSLOG(netsurf, INFO,
"bitmap %p for content %p width %d, height %d",
289 bufferdc = CreateCompatibleDC(NULL);
290 if ((bufferdc == NULL)) {
294 minidc = CreateCompatibleDC(NULL);
295 if ((minidc == NULL)) {
303 SelectObject(bufferdc, fsbitmap->
windib);
316 StretchBlt(minidc, 0, 0,
bitmap->
width,
bitmap->
height, bufferdc, 0, 0,
width,
height, SRCCOPY);
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
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
struct gui_bitmap_table * win32_bitmap_table
static void bitmap_modified(void *bitmap)
The bitmap image has changed, so flush any persistant cache.
static size_t bitmap_get_rowstride(void *bitmap)
Find the width of a pixel row in bytes.
void win32_bitmap_destroy(void *bitmap)
Free a bitmap.
static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
static unsigned char * bitmap_get_buffer(void *bitmap)
Return a pointer to the pixel data in a bitmap.
struct bitmap * bitmap_scale(struct bitmap *prescale, int width, int height)
static void bitmap_set_opaque(void *bitmap, bool opaque)
Sets whether a bitmap should be plotted opaque.
static void * win32_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
Create a bitmap.
static bool bitmap_get_opaque(void *bitmap)
Gets whether a bitmap should be plotted opaque.
Generic bitmap handling interface.
gui_bitmap_flags
Bitmap creation flags.
@ BITMAP_CLEAR
memory should be wiped to 0
@ 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...)
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
int height
height of bitmap
bool opaque
Whether the bitmap is opaque.
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.
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.
const struct plotter_table win_plotters
win32 API plot operation table