Methods

Files

GD2::Canvas::Wedge

Constants

ARC

Arc styles

CHORD
EDGED
NO_FILL
PIE

Public Class Methods

new(center, width, height, range, chord = false) click to toggle source
# File lib/gd2/canvas.rb, line 141
def initialize(center, width, height, range, chord = false)
  super(center, width, height, range)
  @chord = chord
end

Public Instance Methods

draw(image, mode) click to toggle source
# File lib/gd2/canvas.rb, line 146
def draw(image, mode)
  SYM[:gdImageFilledArc].call(image.image_ptr, @center.x, @center.y,
    @width, @height,
    @range.begin.to_degrees.round, @range.end.to_degrees.round,
    mode, style)
  nil
end
style() click to toggle source
# File lib/gd2/canvas.rb, line 154
def style
  (@chord ? CHORD : ARC) | NO_FILL | EDGED
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.