|
NetSurf
|
#include "netsurf/bitmap.h"Go to the source code of this file.
Data Structures | |
| struct | bitmap |
| RISC OS wimp toolkit bitmap. More... | |
Macros | |
| #define | BITMAP_SAVE_FULL_ALPHA (1 << 0) |
| save with full alpha channel (if not opaque) More... | |
Functions | |
| struct osspriteop_area * | riscos_bitmap_convert_8bpp (struct bitmap *bitmap) |
| Convert bitmap to 8bpp sprite. More... | |
| nserror | riscos_bitmap_render (struct bitmap *bitmap, struct hlcache_handle *content) |
| Render content into bitmap. More... | |
| void | riscos_bitmap_overlay_sprite (struct bitmap *bitmap, const struct osspriteop_header *s) |
| Overlay a sprite onto the given bitmap. More... | |
| void * | riscos_bitmap_create (int width, int height, enum gui_bitmap_flags flags) |
| Create a bitmap. More... | |
| void | riscos_bitmap_destroy (void *vbitmap) |
| Free a bitmap. More... | |
| unsigned char * | riscos_bitmap_get_buffer (void *vbitmap) |
| Return a pointer to the pixel data in a bitmap. More... | |
| bool | riscos_bitmap_get_opaque (void *vbitmap) |
| Gets whether a bitmap should be plotted opaque. More... | |
| bool | riscos_bitmap_save (void *vbitmap, const char *path, unsigned flags) |
| Save a bitmap in the platform's native format. More... | |
Variables | |
| struct gui_bitmap_table * | riscos_bitmap_table |
| bitmap operations table More... | |
| #define BITMAP_SAVE_FULL_ALPHA (1 << 0) |
| struct osspriteop_area * riscos_bitmap_convert_8bpp | ( | struct bitmap * | bitmap | ) |
Convert bitmap to 8bpp sprite.
| bitmap | the bitmap to convert. |
Convert bitmap to 8bpp sprite.
| bitmap | the bitmap to convert |
Definition at line 633 of file bitmap.c.
References bitmap_get_height(), bitmap_get_rowstride(), bitmap_get_width(), riscos_bitmap_get_buffer(), save_area, bitmap::sprite_area, thumbnail_32bpp_available, thumbnail_create_8bpp(), thumbnail_restore_output(), thumbnail_switch_output(), tinct_ERROR_DIFFUSE, and Tinct_Plot.
Referenced by ro_gui_save_create_thumbnail(), and ro_gui_window_iconise().
| void * riscos_bitmap_create | ( | int | width, |
| int | height, | ||
| enum gui_bitmap_flags | flags | ||
| ) |
Create a bitmap.
| width | width of image in pixels |
| height | height of image in pixels |
| flags | flags for bitmap creation. |
Definition at line 125 of file bitmap.c.
References bitmap(), BITMAP_CLEAR, BITMAP_OPAQUE, bitmap::clear, bitmap::height, height, bitmap::opaque, bitmap::width, and width.
Referenced by ro_gui_save_create_thumbnail(), and ro_gui_window_iconise().
| void riscos_bitmap_destroy | ( | void * | vbitmap | ) |
Free a bitmap.
| vbitmap | a bitmap, as returned by bitmap_create() |
Definition at line 202 of file bitmap.c.
References bitmap::sprite_area.
Referenced by ro_gui_save_create_thumbnail(), and ro_gui_window_iconise().
| unsigned char * riscos_bitmap_get_buffer | ( | void * | vbitmap | ) |
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 riscos_bitmap_get_rowstride().
| vbitmap | A bitmap as returned by riscos_bitmap_create() |
Definition at line 145 of file bitmap.c.
References bitmap_initialise(), and bitmap::sprite_area.
Referenced by riscos_bitmap_convert_8bpp(), riscos_bitmap_overlay_sprite(), riscos_bitmap_render(), riscos_bitmap_save(), and ro_plot_bitmap().
| bool riscos_bitmap_get_opaque | ( | void * | vbitmap | ) |
Gets whether a bitmap should be plotted opaque.
| vbitmap | A bitmap, as returned by riscos_bitmap_create() |
Definition at line 193 of file bitmap.c.
References bitmap::opaque.
Referenced by riscos_bitmap_save(), ro_plot_bitmap(), and thumbnail_create_8bpp().
| void riscos_bitmap_overlay_sprite | ( | struct bitmap * | bitmap, |
| const struct osspriteop_header * | s | ||
| ) |
Overlay a sprite onto the given bitmap.
| bitmap | bitmap object |
| s | 8bpp sprite to be overlayed onto bitmap |
| nserror riscos_bitmap_render | ( | struct bitmap * | bitmap, |
| struct hlcache_handle * | content | ||
| ) |
Render content into bitmap.
| bitmap | the bitmap to draw to |
| content | content structure to render |
Definition at line 724 of file bitmap.c.
References bitmap_modified(), colourtrans_SET_BG_GCOL, content_scaled_redraw(), bitmap::height, redraw_context::interactive, NSERROR_OK, NSLOG, riscos_bitmap_get_buffer(), ro_plot_origin_x, ro_plot_origin_y, ro_plotters, save_area, bitmap::sprite_area, thumbnail_32bpp_available, thumbnail_create_8bpp(), thumbnail_restore_output(), thumbnail_switch_output(), thumbnail_test(), Tinct_ConvertSprite, and bitmap::width.
Referenced by ro_gui_save_create_thumbnail(), and ro_gui_window_iconise().
| bool riscos_bitmap_save | ( | void * | vbitmap, |
| const char * | path, | ||
| unsigned | flags | ||
| ) |
Save a bitmap in the platform's native format.
| vbitmap | a bitmap, as returned by bitmap_create() |
| path | pathname for file |
| flags | modify the behaviour of the save |
Definition at line 218 of file bitmap.c.
References BITMAP_SAVE_FULL_ALPHA, height, messages_get(), NSLOG, path(), riscos_bitmap_get_buffer(), riscos_bitmap_get_opaque(), ro_warn_user(), SAVE_CHUNK_SIZE, bitmap::sprite_area, and width.
Referenced by ro_gui_save_object_native().
|
extern |