Table Of Contents

Previous topic

GeometryCentre

Next topic

GraphicsBrush

This Page

phoenix_title GraphicsBitmap

Represents a bitmap.

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


class_hierarchy Inheritance Diagram

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 Image.
GetNativeBitmap Return the pointer to the native bitmap data.

property_summary Properties Summary

NativeBitmap See GetNativeBitmap

api Class API



class GraphicsBitmap(GraphicsObject)

Represents a bitmap.

Possible constructors:

GraphicsBitmap()

Methods



__init__(self)

Default constructor creates an invalid bitmap.



ConvertToImage(self)

Return the contents of this bitmap as Image.

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

Invalid image is returned if the bitmap is invalid.

Return type: Image

New 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+.)

New in version 2.9.4.


Properties



NativeBitmap

See GetNativeBitmap