beatmup.InternalBitmap¶
- class beatmup.InternalBitmap¶
Bitmap whose memory is managed by the Beatmup engine. Main pixel data container used internally by Beatmup. Applications would typically use a different incarnation of AbstractBitmap implementing I/O operations, and InternalBitmap instances are used to exchange data between different processing entities (AbstractTask instances) within the application.
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: beatmup.InternalBitmap, context: beatmup.Context, pixel_format: beatmup.PixelFormat, width: int, height: int, allocate: bool = True) -> None
__init__(self: beatmup.InternalBitmap, arg0: beatmup.Context, arg1: str) -> None
Methods
__init__
(*args, **kwargs)Overloaded function.
get_context
(self)Returns Context the current bitmap is attached to
get_depth
(self)Returns depth of the texture in pixels
get_height
(self)Returns height of the texture in pixels
get_memory_size
(self)Returns bitmap size in bytes
get_number_of_channels
(self)Returns number of channels containing in the texture
get_pixel_format
(self)Returns pixel format of the bitmap
get_width
(self)Returns width of the texture in pixels
save_bmp
(self, filename)Saves a bitmap to a BMP file
zero
(self)Sets all the pixels to zero