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.



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

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



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

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