Version: 2.9.3
Public Member Functions
wxGraphicsBitmap Class Reference

#include <wx/graphics.h>

Inheritance diagram for wxGraphicsBitmap:

Detailed Description

Represents a bitmap.

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

Public Member Functions

 wxGraphicsBitmap ()
 Default constructor creates an invalid bitmap.
wxImage ConvertToImage () const
 Return the contents of this bitmap as wxImage.

List of all members.


Constructor & Destructor Documentation

wxGraphicsBitmap::wxGraphicsBitmap ( ) [inline]

Default constructor creates an invalid bitmap.


Member Function Documentation

wxImage wxGraphicsBitmap::ConvertToImage ( ) const

Return the contents of this bitmap as wxImage.

Using this method is more efficient than converting wxGraphicsBitmap to wxBitmap first and then to wxImage and can be useful if, for example, you want to save wxGraphicsBitmap as a disk file in a format not directly supported by wxBitmap.

Invalid image is returned if the bitmap is invalid.

Since:
2.9.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines