Class: GD2::Canvas::Wedge
Direct Known Subclasses
Constant Summary collapse
- ARC =
Arc styles
0
- PIE =
ARC
- CHORD =
1
- NO_FILL =
2
- EDGED =
4
Instance Method Summary collapse
- #draw(image, mode) ⇒ Object
-
#initialize(center, width, height, range, chord = false) ⇒ Wedge
constructor
A new instance of Wedge.
- #style ⇒ Object
Constructor Details
#initialize(center, width, height, range, chord = false) ⇒ Wedge
Returns a new instance of Wedge.
141 142 143 144 |
# File 'lib/gd2/canvas.rb', line 141 def initialize(center, width, height, range, chord = false) super(center, width, height, range) @chord = chord end |
Instance Method Details
#draw(image, mode) ⇒ Object
146 147 148 149 150 151 152 |
# File 'lib/gd2/canvas.rb', line 146 def draw(image, mode) GD2FFI.send(:gdImageFilledArc, image.image_ptr, @center.x.to_i, @center.y.to_i, @width.to_i, @height.to_i, @range.begin.to_degrees.round.to_i, @range.end.to_degrees.round.to_i, mode.to_i, style.to_i) nil end |