Class: Wx::GraphicsBitmap
- Inherits:
-
GraphicsObject
- Object
- Object
- GraphicsObject
- Wx::GraphicsBitmap
- 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.
Instance Method Summary collapse
-
#convert_to_image ⇒ Wx::Image
Return the contents of this bitmap as Image.
-
#initialize ⇒ Wx::GraphicsBitmap
constructor
Default constructor creates an invalid bitmap.
Methods inherited from GraphicsObject
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::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_image ⇒ Wx::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.
519 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 519 def convert_to_image; end |