10#ifndef BACKENDS_GP_SDL_PIXMAP_H
11#define BACKENDS_GP_SDL_PIXMAP_H
44 const SDL_Surface *surf)
47 if (surf->format->BytesPerPixel == 0) {
48 GP_WARN(
"Surface->BytesPerPixel == 0");
52 if (surf->format->BytesPerPixel > 4) {
53 GP_WARN(
"Surface->BytesPerPixel > 4");
61 surf->format->BitsPerPixel);
63 if (pixeltype == GP_PIXEL_UNKNOWN)
67 pixmap->
pixels = surf->pixels;
#define GP_WARN(...)
A debug WARN printf-like macro.
gp_pixel_type
List of all pixel types.
gp_pixel_type gp_pixel_rgb_match(gp_pixel rmask, gp_pixel gmask, gp_pixel bmask, gp_pixel amask, uint8_t bits_per_pixel)
Matches a RGB pixel type againts known pixel types.
static int gp_pixmap_from_sdl_surface(gp_pixmap *pixmap, const SDL_Surface *surf)
A SDL surface to GFXprim pixmap conversion.
uint32_t h
Pixmap height in pixels.
uint8_t * pixels
A pointer to image pixels.
enum gp_pixel_type pixel_type
A pixel format.
uint32_t bytes_per_row
Number of bytes per row.
gp_gamma * gamma
A pointer to a gamma correction table.
uint32_t w
Pixmap width in pixels.