Class: Wx::Image
- Inherits:
-
Object
- Object
- Wx::Image
- Defined in:
- lib/wx/classes/image.rb
Class Method Summary collapse
-
.from_bitmap(bmp) ⇒ Object
Create a new image from Wx::Bitmap, preserving mask information.
-
.read(an_io, type_or_mime, index = -1)) ⇒ Object
Load a new image from an IO-like object that supports “read”.
Instance Method Summary collapse
-
#convert_to_bitmap ⇒ Object
Convert to bitmap.
Class Method Details
.from_bitmap(bmp) ⇒ Object
Create a new image from Wx::Bitmap, preserving mask information
10 11 12 |
# File 'lib/wx/classes/image.rb', line 10 def self.from_bitmap(bmp) bmp.convert_to_image end |
.read(an_io, type_or_mime, index = -1)) ⇒ Object
Load a new image from an IO-like object that supports “read”
3 4 5 6 7 |
# File 'lib/wx/classes/image.rb', line 3 def self.read(an_io, type_or_mime, index = -1) img = new img.load_stream(an_io, type_or_mime, index) img end |
Instance Method Details
#convert_to_bitmap ⇒ Object
Convert to bitmap
28 29 30 |
# File 'lib/wx/classes/image.rb', line 28 def convert_to_bitmap Wx::Bitmap.from_image(self) end |