Go to the source code of this file.
Defines | |
| #define | XMESA_USE_PUTPIXEL_MACRO |
| #define | XMesaPutPixel(__i, __x, __y, __p) |
Functions | |
| XMesaImage * | XMesaCreateImage (int bitsPerPixel, int width, int height, char *data) |
| void | XMesaDestroyImage (XMesaImage *image) |
| unsigned long | XMesaGetPixel (XMesaImage *image, int x, int y) |
| #define XMESA_USE_PUTPIXEL_MACRO |
Definition at line 37 of file xm_image.h.
| #define XMesaPutPixel | ( | __i, | |||
| __x, | |||||
| __y, | |||||
| __p | ) |
Value:
{ \
CARD8 *__row = (CARD8 *)(__i->data + __y*__i->bytes_per_line); \
CARD8 *__i8; \
CARD16 *__i16; \
CARD32 *__i32; \
switch (__i->bits_per_pixel) { \
case 8: \
__i8 = (CARD8 *)__row; \
__i8[__x] = (CARD8)__p; \
break; \
case 15: \
case 16: \
__i16 = (CARD16 *)__row; \
__i16[__x] = (CARD16)__p; \
break; \
case 24: /* WARNING: architecture specific code */ \
__i8 = (CARD8 *)__row; \
__i8[__x*3] = (CARD8)(__p); \
__i8[__x*3+1] = (CARD8)(__p>>8); \
__i8[__x*3+2] = (CARD8)(__p>>16); \
break; \
case 32: \
__i32 = (CARD32 *)__row; \
__i32[__x] = (CARD32)__p; \
break; \
} \
}
Definition at line 44 of file xm_image.h.
| XMesaImage* XMesaCreateImage | ( | int | bitsPerPixel, | |
| int | width, | |||
| int | height, | |||
| char * | data | |||
| ) |
| void XMesaDestroyImage | ( | XMesaImage * | image | ) |
| unsigned long XMesaGetPixel | ( | XMesaImage * | image, | |
| int | x, | |||
| int | y | |||
| ) |
1.5.4