Surface.get_at((x, y)) -> int |
- get a pixel color |
Surface.set_at((x, y), pixel) -> None |
- |
map_rgb((r, g, b)) -> int |
- map_rgb(r, g, b) -> int |
unmap_rgb(color) -> (r, g, b) |
- convert mapped color into RGB |
map_rgba((r, g, b, a)) -> int |
- convert RGBA into a mapped color |
unmap_rgba(color) -> (r, g, b, a) |
- convert mapped color into RGBA |
Surface.lock() -> None |
- locks Surface for pixel access |
Surface.unlock() -> None |
- locks Surface for pixel access |
Surface.mustlock() -> bool |
- check if the surface needs locking |
Surface.get_palette() -> [(r, g, b), ...] |
- get the palette |
Surface.get_palette_at(index) -> (r, g, b) |
- get a palette entry |
Surface.set_palette([(r, g, b), ...]) -> None |
- set the palette |
Surface.set_palette_at(index, (r, g, b)) -> None |
- set a palette entry |
Surface.set_colorkey([color, [flags]]) -> None |
- change colorkey information |
Surface.get_colorkey() -> color |
- query colorkey |
Surface.set_alpha([alpha, [flags]]) -> None |
- change alpha information |
Surface.get_alpha() -> alpha |
- query alpha information |
Surface.convert([src_surface]) -> Surface |
- new copy of surface with different format |
Surface.convert_alpha([src_surface]) -> Surface |
- new copy of surface with different format and per |
Surface.set_clip([rectstyle])) -> Rect |
- assign destination clipping rectangle |
Surface.get_clip() -> rect |
- query the clipping area |
Surface.fill(color, [rectstyle])) -> Rect |
- fill areas of a Surface |
Surface.blit(source, destoffset, [srcoffset, |
- [size]]) -> Rect |
Surface.get_size() -> (x, y) |
- query the surface size |
Surface.get_bitsize() -> int |
- query size of pixel |
Surface.get_bytesize() -> int |
- query size of pixel |
Surface.get_masks() -> (redmask, greenmask, |
- bluemask, alphamask) |
Surface.get_shifts() -> (redshift, greenshift, |
- blueshift, alphashift) |
Surface.get_losses() -> (redloss, greenloss, |
- blueloss, alphaloss) |
pygame.surface(size, [flags, [depth|Surface, |
- [masks]]]) -> Surface |