|
Any functions that directly access a surface's pixel data will need that surface to be lock()'ed. These functions can lock() and unlock() the surfaces themselves without assistance. But, if a function will be called many times, there will be a lot of overhead for multiple locking and unlocking of the surface. It is best to lock the surface manually before making the function call many times, and then unlocking when you are finished. All functions that need a locked surface will say so in their docs.
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 |
copy | - creates a new copy of a Surface |
fill | - fill areas of a Surface |
get_abs_offset | - get absolute offset of subsurface |
get_abs_parent | - get the toplevel surface for a subsurface |
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 flags |
get_height | - query the surface height |
get_locked | - check if the surface needs locking |
get_losses | - get mapping losses for each colorplane |
get_masks | - get mapping bitmasks for each colorplane |
get_offset | - get offset of subsurface |
get_palette | - get the palette |
get_palette_at | - get a palette entry |
get_parent | - get a subsurface parent |
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 |
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 |
subsurface | - create a new surface that shares pixel data |
unlock | - locks Surface for pixel access |
unmap_rgb | - convert mapped color into RGB |