GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Macros | Functions
gp_get_put_pixel.gen.h File Reference

Generated macros and function to access pixels. More...

#include <core/gp_get_set_bits.h>
#include <core/gp_pixmap.h>

Go to the source code of this file.

Macros

#define GP_PIXEL_ADDR_1BPP_DB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 1BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_1BPP_DB(pixmap, x)    (((x + (pixmap)->offset) % 8) * 1)
 A macro to get bit-shift of pixel in 1BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_1BPP_DB(pixmap, x)    (((pixmap)->offset + x) % 8)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_1BPP_UB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 1BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_1BPP_UB(pixmap, x)    (7 - ((x + (pixmap)->offset) % 8) * 1)
 A macro to get bit-shift of pixel in 1BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_1BPP_UB(pixmap, x)    (((pixmap)->offset + x) % 8)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_2BPP_DB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 2BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_2BPP_DB(pixmap, x)    (((x + (pixmap)->offset) % 4) * 2)
 A macro to get bit-shift of pixel in 2BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_2BPP_DB(pixmap, x)    (((pixmap)->offset + x) % 4)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_2BPP_UB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 2BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_2BPP_UB(pixmap, x)    (6 - ((x + (pixmap)->offset) % 4) * 2)
 A macro to get bit-shift of pixel in 2BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_2BPP_UB(pixmap, x)    (((pixmap)->offset + x) % 4)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_4BPP_DB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 4BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_4BPP_DB(pixmap, x)    (((x + (pixmap)->offset) % 2) * 4)
 A macro to get bit-shift of pixel in 4BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_4BPP_DB(pixmap, x)    (((pixmap)->offset + x) % 2)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_4BPP_UB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 4BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_4BPP_UB(pixmap, x)    (4 - ((x + (pixmap)->offset) % 2) * 4)
 A macro to get bit-shift of pixel in 4BPP_UB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_4BPP_UB(pixmap, x)    (((pixmap)->offset + x) % 2)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_8BPP(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 8BPP pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_8BPP(pixmap, x)    (0)
 A macro to get bit-shift of pixel in 8BPP pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_8BPP(pixmap, x)    (0)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_16BPP(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 16BPP pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_16BPP(pixmap, x)    (0)
 A macro to get bit-shift of pixel in 16BPP pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_16BPP(pixmap, x)    (0)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_24BPP(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 24BPP pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_24BPP(pixmap, x)    (0)
 A macro to get bit-shift of pixel in 24BPP pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_24BPP(pixmap, x)    (0)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_32BPP(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 32BPP pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_32BPP(pixmap, x)    (0)
 A macro to get bit-shift of pixel in 32BPP pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_32BPP(pixmap, x)    (0)
 A macro to get pixel offset in pixels.
 
#define GP_PIXEL_ADDR_18BPP_DB(pixmap, x, y)
 A macro to get address of a starting byte for a pixel in a 18BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_SHIFT_18BPP_DB(pixmap, x)    ((18 * (x + (pixmap)->offset)) % 8)
 A macro to get bit-shift of pixel in 18BPP_DB pixmap.
 
#define GP_PIXEL_ADDR_OFFSET_18BPP_DB(pixmap, x)    (0)
 A macro to get pixel offset in pixels.
 

Functions

static gp_pixel gp_getpixel_raw_1BPP_DB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 1BPP_DB
 
static void gp_putpixel_raw_1BPP_DB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 1BPP_DB
 
static gp_pixel gp_getpixel_raw_1BPP_UB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 1BPP_UB
 
static void gp_putpixel_raw_1BPP_UB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 1BPP_UB
 
static gp_pixel gp_getpixel_raw_2BPP_DB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 2BPP_DB
 
static void gp_putpixel_raw_2BPP_DB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 2BPP_DB
 
static gp_pixel gp_getpixel_raw_2BPP_UB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 2BPP_UB
 
static void gp_putpixel_raw_2BPP_UB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 2BPP_UB
 
static gp_pixel gp_getpixel_raw_4BPP_DB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 4BPP_DB
 
static void gp_putpixel_raw_4BPP_DB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 4BPP_DB
 
static gp_pixel gp_getpixel_raw_4BPP_UB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 4BPP_UB
 
static void gp_putpixel_raw_4BPP_UB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 4BPP_UB
 
static gp_pixel gp_getpixel_raw_8BPP (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 8BPP
 
static void gp_putpixel_raw_8BPP (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 8BPP
 
static gp_pixel gp_getpixel_raw_16BPP (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 16BPP
 
static void gp_putpixel_raw_16BPP (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 16BPP
 
static gp_pixel gp_getpixel_raw_24BPP (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 24BPP
 
static void gp_putpixel_raw_24BPP (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 24BPP
 
static gp_pixel gp_getpixel_raw_32BPP (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 32BPP
 
static void gp_putpixel_raw_32BPP (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 32BPP
 
static gp_pixel gp_getpixel_raw_18BPP_DB (const gp_pixmap *c, gp_coord x, gp_coord y)
 gp_getpixel for 18BPP_DB
 
static void gp_putpixel_raw_18BPP_DB (gp_pixmap *c, gp_coord x, gp_coord y, gp_pixel p)
 gp_putpixel for 18BPP_DB
 

Detailed Description

Generated macros and function to access pixels.

Generated macros to access pixel data

These function and macros are generated based on the pixel defintions in gfxprim_config.py. The get and put pixel functions are build on the top of macros to manipulate bytes and bits.

The GP_PIXEL_ADDR macros return a pointer to the first byte of the pixel in the gp_pixmap buffer. If the pixel is aligned to whole bytes, we just need to fetch/write a few bytes. Otherwise we need to compute the shift, fetch a few bytes and then mask and bit shift it.

Note about byte aligment

Unaligned access happens when instruction that works with multiple byte value gets an address that is not divideable by the size of the value. Eg. if 32 bit integer instruction gets an address that is not a multiple of 4. On intel cpus this type of access works and is supported however the C standard defines this as undefined behavior. This fails to work older ARM and most of the non intel cpus. So some more trickery must be done in order to write unaligned multibyte values. First of all we must compute offset and number of bytes to be accessed (which is cruicial for speed as we are going to read the pixel value byte by byte).

The offsets (starting with the first one e.g. pixel_size mod 8) forms subgroup in the mod 8 cyclic group. The maximal count of bits, from the start of the byte, then will be max from this subgroup + pixel_size. If this number is less or equal to 8 * N, we could write such pixel by writing N bytes.

For example the offsets of 16 BPP forms subgroup only with {0} so we only need 2 bytes to write it. As a matter of fact the 16 and 32 BPP are special cases that are always aligned together with the 8 BPP (which is aligned trivially). These three are coded as special cases which yields to faster operations in case of 16 and 32 BPP. The 24 BPP is not aligned as there are no instruction to operate 3 byte long numbers.

For second example take offsets of 20 BPP that forms subgroup {4, 0} so the max + pixel_size = 24 and indeed we fit into 3 bytes.

If pixel_size is coprime to 8, the offsets generates whole group and so the max + pixel_size = 7 + pixel_size. The 17 BPP fits into 24 bits and so 3 bytes are needed. The 19 BPP fits into 26 bits and because of that 4 bytes are needed.

Once we figure maximal number of bytes and the offset all that is to be done is to fetch first and last byte to combine it together with given pixel value and write the result back to the bitmap.

Definition in file gp_get_put_pixel.gen.h.

Macro Definition Documentation

◆ GP_PIXEL_ADDR_16BPP

#define GP_PIXEL_ADDR_16BPP (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(16 * (x)) / 8))
uint32_t gp_pixel
Pixel integer value.
Definition gp_types.h:33

A macro to get address of a starting byte for a pixel in a 16BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 626 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_18BPP_DB

#define GP_PIXEL_ADDR_18BPP_DB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(18 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 18BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 860 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_1BPP_DB

#define GP_PIXEL_ADDR_1BPP_DB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(1 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 1BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 86 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_1BPP_UB

#define GP_PIXEL_ADDR_1BPP_UB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(1 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 1BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 164 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_24BPP

#define GP_PIXEL_ADDR_24BPP (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(24 * (x)) / 8))

A macro to get address of a starting byte for a pixel in a 24BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 698 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_2BPP_DB

#define GP_PIXEL_ADDR_2BPP_DB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(2 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 2BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 242 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_2BPP_UB

#define GP_PIXEL_ADDR_2BPP_UB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(2 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 2BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 320 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_32BPP

#define GP_PIXEL_ADDR_32BPP (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(32 * (x)) / 8))

A macro to get address of a starting byte for a pixel in a 32BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 788 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_4BPP_DB

#define GP_PIXEL_ADDR_4BPP_DB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(4 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 4BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 398 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_4BPP_UB

#define GP_PIXEL_ADDR_4BPP_UB (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(4 * ((pixmap)->offset + x)) / 8))

A macro to get address of a starting byte for a pixel in a 4BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 476 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_8BPP

#define GP_PIXEL_ADDR_8BPP (   pixmap,
  x,
 
)
Value:
((gp_pixel*)(((void*)((pixmap)->pixels)) + (pixmap)->bytes_per_row * (y) + \
(8 * (x)) / 8))

A macro to get address of a starting byte for a pixel in a 8BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate within the pixmap.
yAn y coordinate within the pixmap.

Definition at line 554 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_16BPP

#define GP_PIXEL_ADDR_SHIFT_16BPP (   pixmap,
 
)     (0)

A macro to get bit-shift of pixel in 16BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 636 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_18BPP_DB

#define GP_PIXEL_ADDR_SHIFT_18BPP_DB (   pixmap,
 
)     ((18 * (x + (pixmap)->offset)) % 8)

A macro to get bit-shift of pixel in 18BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 870 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_1BPP_DB

#define GP_PIXEL_ADDR_SHIFT_1BPP_DB (   pixmap,
 
)     (((x + (pixmap)->offset) % 8) * 1)

A macro to get bit-shift of pixel in 1BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 96 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_1BPP_UB

#define GP_PIXEL_ADDR_SHIFT_1BPP_UB (   pixmap,
 
)     (7 - ((x + (pixmap)->offset) % 8) * 1)

A macro to get bit-shift of pixel in 1BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 174 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_24BPP

#define GP_PIXEL_ADDR_SHIFT_24BPP (   pixmap,
 
)     (0)

A macro to get bit-shift of pixel in 24BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 708 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_2BPP_DB

#define GP_PIXEL_ADDR_SHIFT_2BPP_DB (   pixmap,
 
)     (((x + (pixmap)->offset) % 4) * 2)

A macro to get bit-shift of pixel in 2BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 252 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_2BPP_UB

#define GP_PIXEL_ADDR_SHIFT_2BPP_UB (   pixmap,
 
)     (6 - ((x + (pixmap)->offset) % 4) * 2)

A macro to get bit-shift of pixel in 2BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 330 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_32BPP

#define GP_PIXEL_ADDR_SHIFT_32BPP (   pixmap,
 
)     (0)

A macro to get bit-shift of pixel in 32BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 798 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_4BPP_DB

#define GP_PIXEL_ADDR_SHIFT_4BPP_DB (   pixmap,
 
)     (((x + (pixmap)->offset) % 2) * 4)

A macro to get bit-shift of pixel in 4BPP_DB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 408 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_4BPP_UB

#define GP_PIXEL_ADDR_SHIFT_4BPP_UB (   pixmap,
 
)     (4 - ((x + (pixmap)->offset) % 2) * 4)

A macro to get bit-shift of pixel in 4BPP_UB pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 486 of file gp_get_put_pixel.gen.h.

◆ GP_PIXEL_ADDR_SHIFT_8BPP

#define GP_PIXEL_ADDR_SHIFT_8BPP (   pixmap,
 
)     (0)

A macro to get bit-shift of pixel in 8BPP pixmap.

Parameters
pixmapA pixmap.
xAn x coordinate in the pixmap.

Definition at line 564 of file gp_get_put_pixel.gen.h.

Function Documentation

◆ gp_getpixel_raw_16BPP()

static gp_pixel gp_getpixel_raw_16BPP ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 16BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 656 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_16BPP.

◆ gp_getpixel_raw_18BPP_DB()

static gp_pixel gp_getpixel_raw_18BPP_DB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 18BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 890 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS3_ALIGNED, GP_PIXEL_ADDR_18BPP_DB, and GP_PIXEL_ADDR_SHIFT_18BPP_DB.

◆ gp_getpixel_raw_1BPP_DB()

static gp_pixel gp_getpixel_raw_1BPP_DB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 1BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 116 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_1BPP_DB, and GP_PIXEL_ADDR_SHIFT_1BPP_DB.

◆ gp_getpixel_raw_1BPP_UB()

static gp_pixel gp_getpixel_raw_1BPP_UB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 1BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 194 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_1BPP_UB, and GP_PIXEL_ADDR_SHIFT_1BPP_UB.

◆ gp_getpixel_raw_24BPP()

static gp_pixel gp_getpixel_raw_24BPP ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 24BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 728 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS3_ALIGNED, GP_PIXEL_ADDR_24BPP, and GP_PIXEL_ADDR_SHIFT_24BPP.

◆ gp_getpixel_raw_2BPP_DB()

static gp_pixel gp_getpixel_raw_2BPP_DB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 2BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 272 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_2BPP_DB, and GP_PIXEL_ADDR_SHIFT_2BPP_DB.

◆ gp_getpixel_raw_2BPP_UB()

static gp_pixel gp_getpixel_raw_2BPP_UB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 2BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 350 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_2BPP_UB, and GP_PIXEL_ADDR_SHIFT_2BPP_UB.

◆ gp_getpixel_raw_32BPP()

static gp_pixel gp_getpixel_raw_32BPP ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 32BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 818 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_32BPP.

◆ gp_getpixel_raw_4BPP_DB()

static gp_pixel gp_getpixel_raw_4BPP_DB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 4BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 428 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_4BPP_DB, and GP_PIXEL_ADDR_SHIFT_4BPP_DB.

◆ gp_getpixel_raw_4BPP_UB()

static gp_pixel gp_getpixel_raw_4BPP_UB ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 4BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 506 of file gp_get_put_pixel.gen.h.

References GP_GET_BITS1_ALIGNED, GP_PIXEL_ADDR_4BPP_UB, and GP_PIXEL_ADDR_SHIFT_4BPP_UB.

◆ gp_getpixel_raw_8BPP()

static gp_pixel gp_getpixel_raw_8BPP ( const gp_pixmap c,
gp_coord  x,
gp_coord  y 
)
inlinestatic

gp_getpixel for 8BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
Returns
A pixel value at x, y.

Definition at line 584 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_8BPP.

◆ gp_putpixel_raw_16BPP()

static void gp_putpixel_raw_16BPP ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 16BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 674 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_16BPP.

◆ gp_putpixel_raw_18BPP_DB()

static void gp_putpixel_raw_18BPP_DB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 18BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 917 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_18BPP_DB, GP_PIXEL_ADDR_SHIFT_18BPP_DB, and GP_SET_BITS3_ALIGNED.

◆ gp_putpixel_raw_1BPP_DB()

static void gp_putpixel_raw_1BPP_DB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 1BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 137 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_1BPP_DB, GP_PIXEL_ADDR_SHIFT_1BPP_DB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_1BPP_UB()

static void gp_putpixel_raw_1BPP_UB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 1BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 215 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_1BPP_UB, GP_PIXEL_ADDR_SHIFT_1BPP_UB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_24BPP()

static void gp_putpixel_raw_24BPP ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 24BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 755 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_24BPP, GP_PIXEL_ADDR_SHIFT_24BPP, and GP_SET_BITS3_ALIGNED.

◆ gp_putpixel_raw_2BPP_DB()

static void gp_putpixel_raw_2BPP_DB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 2BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 293 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_2BPP_DB, GP_PIXEL_ADDR_SHIFT_2BPP_DB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_2BPP_UB()

static void gp_putpixel_raw_2BPP_UB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 2BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 371 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_2BPP_UB, GP_PIXEL_ADDR_SHIFT_2BPP_UB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_32BPP()

static void gp_putpixel_raw_32BPP ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 32BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 836 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_32BPP.

◆ gp_putpixel_raw_4BPP_DB()

static void gp_putpixel_raw_4BPP_DB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 4BPP_DB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 449 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_4BPP_DB, GP_PIXEL_ADDR_SHIFT_4BPP_DB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_4BPP_UB()

static void gp_putpixel_raw_4BPP_UB ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 4BPP_UB

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 527 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_4BPP_UB, GP_PIXEL_ADDR_SHIFT_4BPP_UB, and GP_SET_BITS1_ALIGNED.

◆ gp_putpixel_raw_8BPP()

static void gp_putpixel_raw_8BPP ( gp_pixmap c,
gp_coord  x,
gp_coord  y,
gp_pixel  p 
)
inlinestatic

gp_putpixel for 8BPP

Warning
The x and y must be inside of the pixmap!
Parameters
cA pixmap.
xA x coordinate.
yA y coordinate.
pA pixel value to be written into the buffer.

Definition at line 602 of file gp_get_put_pixel.gen.h.

References GP_PIXEL_ADDR_8BPP.