Class: GD2::Canvas::TextCircle

Inherits:
Object
  • Object
show all
Defined in:
lib/gd2/canvas.rb

Instance Method Summary collapse

Constructor Details

#initialize(font, point, radius, text_radius, fill_portion, top, bottom) ⇒ TextCircle

Returns a new instance of TextCircle.



199
200
201
202
203
204
205
206
207
208
# File 'lib/gd2/canvas.rb', line 199

def initialize(font, point, radius, text_radius, fill_portion,
    top, bottom)
  @font = font
  @point = point
  @radius = radius
  @text_radius = text_radius
  @fill_portion = fill_portion
  @top = top
  @bottom = bottom
end

Instance Method Details

#draw(image, color) ⇒ Object



210
211
212
213
# File 'lib/gd2/canvas.rb', line 210

def draw(image, color)
  @font.draw_circle(image.image_ptr, @point.x, @point.y, @radius,
    @text_radius, @fill_portion, @top, @bottom, color)
end