Sha256: 1056bc6109b33c6e0ebcda496de29044301dab3d08facafe6a40b8b3291b15bf
Contents?: true
Size: 358 Bytes
Versions: 1
Compression:
Stored size: 358 Bytes
Contents
class QuadrilateralPresenter < Straightedge::Gosu::Presenter def display(rect) real_coords = rect.corners.map { |xy| [xy.x + rect.x, xy.y + rect.y ] } colored_coords = colorize(real_coords, Straightedge::Colors.hex_value(rect.color)) #puts "--- rendering #{rect.color} at #{rect.x}, #{rect.y}" @surface.draw_quad(*colored_coords) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
straightedge-gosu-0.1.0 | lib/straightedge/gosu/presenters/quadrilateral_presenter.rb |