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


180
181
182
183
184
185
186
187
188
189
# File 'lib/gd2/canvas.rb', line 180

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


191
192
193
194
# File 'lib/gd2/canvas.rb', line 191

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