|
||
Home ||
Help Contents ||
|| CD || Channel || Font || Joystick || Rect || Sound || Surface || || pygame || cdrom || constants || display || event || font || image || || joystick || key || mixer || mixer_music || mouse || surfarray || time || |
Here is the quick breakdown of how packed pixels work (don't worry if you don't quite understand this, it is only here for informational purposes, it is not needed). Each colorplane mask can be used to isolate the values for a colorplane from the packed pixel color. Therefore PACKED_COLOR & RED_MASK == REDPLANE. Note that the REDPLANE is not exactly the red color value, but it is the red color value bitwise left shifted a certain amount. The losses and masks can be used to convert back and forth between each colorplane and the actual color for that plane. Here are the final formulas used be map and unmap (not exactly, heh). PACKED_COLOR = RED>>losses[0]<
blit | - copy a one Surface to another. |
convert | - new copy of surface with different format |
convert_alpha | - new copy of surface with different format and per pixel alpha |
fill | - fill areas of a Surface |
get_alpha | - query alpha information |
get_at | - get a pixel color |
get_bitsize | - query size of pixel |
get_bytesize | - query size of pixel |
get_clip | - query the clipping area |
get_colorkey | - query colorkey |
get_flags | - query the surface width |
get_height | - query the surface height |
get_losses | - get mapping losses for each colorplane |
get_masks | - get mapping bitmasks for each colorplane |
get_palette | - get the palette |
get_palette_at | - get a palette entry |
get_pitch | - query the surface pitch |
get_rect | - get a rectangle covering the entire surface |
get_shifts | - alphashift |
get_size | - query the surface size |
get_width | - query the surface width |
lock | - locks Surface for pixel access |
map_rgb | - convert RGB into a mapped color |
mustlock | - check if the surface needs locking |
save | - save surface as BMP data |
set_alpha | - change alpha information |
set_at | - set pixel at given position |
set_clip | - assign destination clipping rectangle |
set_colorkey | - change colorkey information |
set_palette | - set the palette |
set_palette_at | - set a palette entry |
unlock | - locks Surface for pixel access |
unmap_rgb | - convert mapped color into RGB |