GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.GraphicsBitmap
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.GraphicsBitmap — wxPython 4.3.2 Docs

phoenix_title wx.GraphicsBitmap¶

Represents a bitmap.

The objects of this class are not created directly but only via wx.GraphicsContext or wx.GraphicsRenderer CreateBitmap(), CreateBitmapFromImage() or CreateSubBitmap() methods. They can subsequently be used with wx.GraphicsContext.DrawBitmap . The only other operation is testing for the bitmap validity, which can be performed using IsNull inherited from the base class.


class_hierarchy Class Hierarchy¶

Inheritance diagram for class GraphicsBitmap:

Inheritance diagram of GraphicsBitmap


method_summary Methods Summary¶

__init__

Default constructor creates an invalid bitmap.

ConvertToImage

Return the contents of this bitmap as a wx.Image.

GetNativeBitmap

Return the pointer to the native bitmap data.


property_summary Properties Summary¶

NativeBitmap

See GetNativeBitmap


api Class API¶

class wx.GraphicsBitmap(GraphicsObject)¶

Possible constructors:

GraphicsBitmap() -> None

Represents a bitmap.


Methods¶

__init__(self)¶

Default constructor creates an invalid bitmap.

Return type:

None



ConvertToImage(self)¶

Return the contents of this bitmap as a wx.Image.

Using this method is more efficient than converting a wx.GraphicsBitmap to a wx.Bitmap first and then to a wx.Image. This can be useful if, for example, you want to save a wx.GraphicsBitmap in a file format not directly supported by wx.Bitmap.

Invalid image is returned if the bitmap is invalid.

Return type:

wx.Image

Added in version 2.9.3.



GetNativeBitmap(self)¶

Return the pointer to the native bitmap data.

( CGImageRef for Core Graphics, cairo_surface_t for Cairo, Bitmap* for GDI+.)

Return type:

Any

Added in version 2.9.4.


Properties¶

NativeBitmap¶

See GetNativeBitmap

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.