Class: SGL::NSImage
- Inherits:
-
OSX::NSImage
- Object
- OSX::NSImage
- SGL::NSImage
- Includes:
- FrameTranslator
- Defined in:
- lib/sgl/cocoa-media.rb
Instance Method Summary collapse
Instance Method Details
#frame(x, y, w, h) ⇒ Object
98 99 100 101 102 103 |
# File 'lib/sgl/cocoa-media.rb', line 98 def frame(x,y,w,h) drawInRect([x,y,w,h], :fromRect, [0,0,size.width,size.height], :operation, OSX::NSCompositeSourceOver, :fraction, @app.get_cur_color_alpha) end |
#rect(a, b, c, d) ⇒ Object
94 95 96 |
# File 'lib/sgl/cocoa-media.rb', line 94 def rect(a,b,c,d) frame(*to_xywh(a, b, c, d)) end |
#setApp(app) ⇒ Object
92 |
# File 'lib/sgl/cocoa-media.rb', line 92 def setApp(app) @app = app; end |