24#ifndef NS_ATARI_BITMAP_H
25#define NS_ATARI_BITMAP_H
28#include <Hermes/Hermes.h>
30#define NS_BMP_DEFAULT_BPP 4
33#define MFDB_FLAG_STAND 0x01
34#define MFDB_FLAG_ZEROMEM 0x02
35#define MFDB_FLAG_NOALLOC 0x04
37#define BITMAP_SHRINK 0
38#define BITMAP_GROW 1024
39#define BITMAP_CLEAR 2048
45#define MFDB_STRIDE( w ) (((w & 15) != 0) ? (w | 15)+1 : w)
55#define MFDB_SIZE( bpp, stride, h ) ( ((stride >> 3) * h) * bpp )
83int init_mfdb(
int bpp,
int w,
int h, uint32_t flags, MFDB * out );
bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h, HermesFormat *fmt, int nw, int nh)
size_t atari_bitmap_buffer_size(void *bitmap)
size_t atari_bitmap_get_rowstride(void *bitmap)
Find the width of a pixel row in bytes.
bool atari_bitmap_get_opaque(void *bitmap)
Gets whether a bitmap should be plotted opaque.
void atari_bitmap_destroy(void *bitmap)
Free a bitmap.
void * atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags)
Create a bitmap.
struct gui_bitmap_table * atari_bitmap_table
int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB *out)
setup an MFDB struct and allocate memory for it when it is needed.
int atari_bitmap_get_height(void *bitmap)
Get bitmap height.
int atari_bitmap_get_width(void *bitmap)
Get bitmap width.
void * atari_bitmap_realloc(int w, int h, short bpp, int rowstride, unsigned int state, void *bmp)
gui_bitmap_flags
Bitmap creation flags.
RISC OS wimp toolkit bitmap.
int height
height of bitmap
bool opaque
Whether the bitmap is opaque.