Method: Ruby2D::Canvas#draw_pixmap
- Defined in:
- lib/ruby2d/canvas.rb
#draw_pixmap(pixmap, x:, y:, width: nil, height: nil, crop: nil) ⇒ Object
Note:
This API will evolve to be able to draw a portion of the pixmap; coming soon.
Draw the pixmap at the specified location and size
275 276 277 278 |
# File 'lib/ruby2d/canvas.rb', line 275 def draw_pixmap(pixmap, x:, y:, width: nil, height: nil, crop: nil) src_rect = crop ? [crop[:x], crop[:y], crop[:width], crop[:height]] : nil ext_draw_pixmap pixmap, src_rect, x, y, width, height end |