This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int generate_indexed_something(size_t BufPixels, xxx ResultArray, xxx pixels, int_t pixlen) | |
{ | |
PyObject * BufString = 0; | |
PyObject * Result = 0; | |
/* extend ResultArray by a bunch of converted pixels at a time */ | |
if (BufPixels % 4 != 0) | |
{ | |
/* fill out unused part of byte with zeroes--actually shouldn't occur */ | |
PixBuf[BufPixels / 4] &= ~(0xff << BufPixels % 4 * 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void ParseColorsTuple | |
( | |
PyObject * ColorTuple, | |
uint32_t * colors /* array of 4 elements */ | |
) | |
/* parses ColorTuple as a tuple of 4 elements, each in turn being a tuple of | |
4 integers (r, g, b, a) each in the range [0 .. 255]. Puts the result as | |
Cairo-format pixel values into colors. */ | |
{ | |
PyObject * TheColors[4] = {0, 0, 0, 0}; |
NewerOlder