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 method 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.



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

def initialize; end

Instance Method Details

#convert_to_imageWx::Image

Return the contents of this bitmap as Image.

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

Returns:



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

def convert_to_image; end