Class: Wx::GraphicsBitmap

Inherits:
GraphicsObject show all
Defined in:
lib/wx/doc/gen/graphics_object.rb

Overview

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 Wx::GraphicsContext#draw_bitmap. The only other operation is testing for the bitmap validity, which can be performed using Wx::GraphicsObject#is_null inherited from the base class.

Requires:

  • USE_GRAPHICS_CONTEXT

Instance Method Summary collapse

Methods inherited from GraphicsObject

#get_renderer, #is_null

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::GraphicsBitmap

Default constructor creates an invalid bitmap.



535
# File 'lib/wx/doc/gen/graphics_object.rb', line 535

def initialize; end

Instance Method Details

#convert_to_imageWx::Image

Return the contents of this bitmap as a Image.

Using this method is more efficient than converting a Wx::GraphicsBitmap to a Bitmap first and then to a Image. This can be useful if, for example, you want to save a Wx::GraphicsBitmap in a file format not directly supported by Bitmap. Invalid image is returned if the bitmap is invalid.

Returns:



542
# File 'lib/wx/doc/gen/graphics_object.rb', line 542

def convert_to_image; end