Class: Gtk::Pong::CenteredRect
- Inherits:
-
CenteredItem
- Object
- CenteredItem
- Gtk::Pong::CenteredRect
- Defined in:
- lib/games_paradise/pong/gtk/cairo_pong.rb
Direct Known Subclasses
Constant Summary
Constants inherited from CenteredItem
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 Gtk::Pong::CenteredItem
Instance Method Details
#draw(cr) ⇒ Object
draw
63 64 65 66 67 68 |
# File 'lib/games_paradise/pong/gtk/cairo_pong.rb', line 63 def draw(cr) cr.translate(min_x, min_y) cr.scale(@width, @height) cr.rectangle(0, 0, 1, 1) cr.fill end |