Class: GamesAndRpgParadise::Gtk::Pong::CenteredRect
- Inherits:
-
CenteredItem
- Object
- CenteredItem
- GamesAndRpgParadise::Gtk::Pong::CenteredRect
- Defined in:
- lib/games_and_rpg_paradise/games/pong/gtk/cairo_pong.rb
Direct Known Subclasses
Constant Summary
Constants inherited from CenteredItem
GamesAndRpgParadise::Gtk::Pong::CenteredItem::NAMESPACE
Instance Attribute Summary
Attributes inherited from CenteredItem
Instance Method Summary collapse
-
#draw(cr) ⇒ Object
draw.
Methods inherited from CenteredItem
#initialize, #max_x, #max_y, #min_x, #min_y
Constructor Details
This class inherits a constructor from GamesAndRpgParadise::Gtk::Pong::CenteredItem
Instance Method Details
#draw(cr) ⇒ Object
draw
76 77 78 79 80 81 |
# File 'lib/games_and_rpg_paradise/games/pong/gtk/cairo_pong.rb', line 76 def draw(cr) cr.translate(min_x, min_y) cr.scale(@width, @height) cr.rectangle(0, 0, 1, 1) cr.fill end |