Class: GD2::Canvas::Ellipse
- Inherits:
-
Object
- Object
- GD2::Canvas::Ellipse
- Defined in:
- lib/gd2/canvas.rb
Direct Known Subclasses
Instance Method Summary collapse
- #draw(image, mode) ⇒ Object
-
#initialize(center, width, height) ⇒ Ellipse
constructor
A new instance of Ellipse.
Constructor Details
#initialize(center, width, height) ⇒ Ellipse
Returns a new instance of Ellipse.
166 167 168 |
# File 'lib/gd2/canvas.rb', line 166 def initialize(center, width, height) @center, @width, @height = center, width, height end |
Instance Method Details
#draw(image, mode) ⇒ Object
170 171 172 173 174 |
# File 'lib/gd2/canvas.rb', line 170 def draw(image, mode) SYM[:gdImageArc].call(image.image_ptr, @center.x, @center.y, @width, @height, 0, 360, mode) nil end |