pygame2.sdlext.base
The pygame2.sdlext.base C API contains objects and functions for
accessing and manipulating pygame2.sdl objects in a specialised
manner.
Import
Include headers:
-
int import_pygame2_sdlext_base(void)
- Imports the pygame2.sdlext.base module. This returns 0 on
success and -1 on failure.
PyPixelArray
-
PyPixelArray
-
PyPixelArray_Type
The PyPixelArray object is used manipulating the design of the visible
mouse cursor.
Members
-
PyObject* PyPixelArray.surface
- The PySDLSurface referenced by the PyPixelArray.
-
PyObject* PyPixelArray.parent
- The parent PyPixelArray, if any.
-
Uint32 PyPixelArray.xstart
- The X start offset for a subarray. For an initial PyPixelArray this
will be 0.
-
Uint32 PyPixelArray.ystart
- The Y start offset for a subarray. For an initial PyPixelArray this
will be 0.
-
Uint32 PyPixelArray.xlen
- The X segment length in pixels. For an initial PixelArray this will
be the width of the PySDLSurface.
-
Uint32 PyPixelArray.ylen
- The Y segment length in pixels. For an initial PixelArray this will
be the height of the PySDLSurface.
-
Sint32 PyPixelArray.xstep
- The step width in the X direction to reach the next accessible pixel. For an
initial PixelArray this will be 1.
-
Sint32 PyPixelArray.xstep
- The step width in the Y direction to reach the next accessible row. For an
initial PixelArray this will be 1.
-
Uint32 PyPixelArray.padding
- The overall padding in X direction to reach the next row. As the pixel buffer
of the PySDLSurface is a 1D array, the padding denotes
the overall length in bytes to reach the next row of pixels. This is usually
the same as the pitch of the PySDLSurface.
Functions
-
int PyPixelArray_Check(PyObject *obj)
- Returns true, if the argument is a PyPixelArray or a subclass of
PyPixelArray.
-
PyObject* PyPixelArray_New(PyObject *obj)
- Creates a new PyPixelArray object from the passed
PySDLSurface. On failure, this returns NULL.