Class: Fox::FXImage
- Inherits:
-
Object
- Object
- Fox::FXImage
- Defined in:
- lib/camellia-fox.rb
Instance Method Summary collapse
Instance Method Details
#to_camellia ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/camellia-fox.rb', line 8 def to_camellia s=FXStream.new mem=" "*(width*height*4) s.open(FXStreamSave, width*height*4, mem) unbound_savePixels=FXImage.instance_method(:savePixels) bound_savePixels=unbound_savePixels.bind(self) bound_savePixels.call(s) image=CamImage.new(width, height, CAM_DEPTH_8U, CAM_COLORMODEL_RGBA) image.set_pixels(mem) return image end |