Class: Wx::Bitmap
- Inherits:
-
Object
- Object
- Wx::Bitmap
- Defined in:
- lib/wx/classes/bitmap.rb
Class Method Summary collapse
-
.from_image(img, depth = -1)) ⇒ Object
Constructor copying data from an image.
Instance Method Summary collapse
-
#draw {|dc| ... } ⇒ Object
Accepts a block, which will be passed a device context which can be used to draw upon the Bitmap.
Class Method Details
.from_image(img, depth = -1)) ⇒ Object
Constructor copying data from an image
3 4 5 |
# File 'lib/wx/classes/bitmap.rb', line 3 def self.from_image(img, depth = -1) new(img, depth) end |
Instance Method Details
#draw {|dc| ... } ⇒ Object
Accepts a block, which will be passed a device context which can be used to draw upon the Bitmap
22 23 24 25 26 27 |
# File 'lib/wx/classes/bitmap.rb', line 22 def draw dc = Wx::MemoryDC.new dc.select_object(self) yield dc dc.select_object( Wx::NULL_BITMAP ) end |