| |
- __builtin__.object
-
- View
-
- Screen
class Screen(View) |
|
The pygame display.
Assign one of these to State.screen in order to make the library aware of
the main display surface. |
|
- Method resolution order:
- Screen
- View
- __builtin__.object
Methods defined here:
- __init__(self, size=0, flags=0, surface=None)
- Initialize the pygame display.
If surface is specified, it is used as the screen's surface and pygame
display initialization is not performed.
Otherwise, size and flags are used to initialize the pygame display.
- flip(self)
- Flip the pygame display.
Methods inherited from View:
- blit(self, surf, pos, area=None, special_flags=0)
- Blit a surface to this surface.
- clear(self)
- Fill the surface with self.fill_color.
- fill(self, color, rect=None, special_flags=0)
- Fill this surface with color.
Data descriptors inherited from View:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- abs_offset
- The absolute offset of the subsurface.
- center
- The center coordinate of the surface.
- height
- The height of the surface.
- size
- The size of the surface.
- width
- The width of the surface.
|
class View(__builtin__.object) |
|
Views are used to access areas of a pygame surface. They are analogous
to surfaces and subsurfaces.
Access the pygame surface via the surface attribute.
Access the surface's rect via the rect attribute.
For subsurfaces, the rect for the subsurface in the parent surface can be
accessed via the parent_rect attribute. If this instance does not represent
a subsurface then rect and parent_rect will be equivalent. |
|
Methods defined here:
- __init__(self, surface=None, subsurface_rect=None)
- Create an instance of Surface.
If only surface is specified then it is used as the instance's surface.
If subsurface_rect is specified then a subsurface of the surface
argument is gotten for the instance's surface.
The surface argument is a pygame surface.
The subsurface_rect argument is the area of a subsurface to get from
the surface argument.
- blit(self, surf, pos, area=None, special_flags=0)
- Blit a surface to this surface.
- clear(self)
- Fill the surface with self.fill_color.
- fill(self, color, rect=None, special_flags=0)
- Fill this surface with color.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- abs_offset
- The absolute offset of the subsurface.
- center
- The center coordinate of the surface.
- height
- The height of the surface.
- size
- The size of the surface.
- width
- The width of the surface.
| |