Parent

Files

GD2::Canvas::Polygon

Public Class Methods

new(points) click to toggle source
# File lib/gd2/canvas.rb, line 89
def initialize(points)
  @points = points
end

Public Instance Methods

draw(image, mode) click to toggle source
# File lib/gd2/canvas.rb, line 93
def draw(image, mode)
  SYM[draw_sym].call(image.image_ptr, @points.map { |point|
    point.coordinates.pack('i_i_')
  }.join('').to_ptr, @points.length, mode)
  nil
end
draw_sym() click to toggle source
# File lib/gd2/canvas.rb, line 100
def draw_sym
  :gdImagePolygon
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.