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 inherited from the base class.
Instance Method Summary collapse
-
#convert_to_image ⇒ Wx::Image
Return the contents of this bitmap as a 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.
535 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 535 def initialize; end |
Instance Method Details
#convert_to_image ⇒ Wx::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.
542 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 542 def convert_to_image; end |