PyGame Logo
PyGame
Documentation
||  Home  ||  Help Contents  ||
 
|| CD || Channel || Font || Joystick || Rect ||
|| Sound || Surface || pygame || cdrom || display ||
|| event || font || image || joystick || key ||
|| mixer || mouse || music || surfarray || time ||

Surface

Contains the Surface object.
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_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_rect - get a rectangle covering the entire surface
get_shifts - get mapping shifts for each colorplane
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
map_rgba - convert RGBA 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
unlock - locks Surface for pixel access
unmap_rgb - convert mapped color into RGB
unmap_rgba - convert mapped color into RGBA

blit
Surface.blit(source, destoffset, [srcoffset, [size]]) -> Rect
 
convert
Surface.convert([src_surface]) -> Surface
 
convert_alpha
Surface.convert_alpha([src_surface]) -> Surface

 
fill
Surface.fill(color, [rectstyle])) -> Rect
 
get_alpha
Surface.get_alpha() -> alpha
 
get_at
Surface.get_at([x, y]) -> int
 
get_bitsize
Surface.get_bitsize() -> int
 
get_bytesize
Surface.get_bytesize() -> int
 
get_clip
Surface.get_clip() -> rect
 
get_colorkey
Surface.get_colorkey() -> color
 
get_height
Surface.get_height() -> height
 
get_losses
Surface.get_losses() -> redloss, greenloss, blueloss, alphaloss
 
get_masks
Surface.get_masks() -> redmask, greenmask, bluemask, alphamask
 
get_palette
Surface.get_palette() -> [[r, g, b], ...]
 
get_palette_at
Surface.get_palette_at(index) -> r, g, b
 
get_rect
Surface.get_rect() -> rect
 
get_shifts
Surface.get_shifts() -> redshift, greenshift, blueshift, alphashift
 
get_size
Surface.get_size() -> x, y
 
get_width
Surface.get_width() -> width
 
lock
Surface.lock() -> None

 
map_rgb
Surface.map_rgb([r, g, b]) -> int
 
map_rgba
Surface.map_rgba([r, g, b, a]) -> int
 
mustlock
Surface.mustlock() -> bool
 
set_alpha
Surface.set_alpha([alpha, [flags]]) -> None
 
set_at
Surface.set_at([x, y], pixel) -> None
 
set_clip
Surface.set_clip([rectstyle])) -> Rect
 
set_colorkey
Surface.set_colorkey([color, [flags]]) -> None
 
set_palette
Surface.set_palette([[r, g, b], ...]) -> None
 
set_palette_at
Surface.set_palette_at(index, [r, g, b]) -> None
 
unlock
Surface.unlock() -> None

 
unmap_rgb
Surface.unmap_rgb(color) -> r, g, b
 
unmap_rgba
Surface.unmap_rgba(color) -> r, g, b, a