Return a new Imlib2::Polygon
Examples:
poly = Imlib2::Polygon.new points = [[10, 10], [20, 30], [15, 8], [6, 3], [12, 2]] poly = Imlib2::Polygon.new *points
Return the bounding rectangle of the given polygon.
Example:
bounds = poly.bounds %q(x y w h).each_index { |i, v| puts v << ' = ' << bounds[i] }
Does the given point lie within the polygon?
Example:
if poly.contains? 12, 5 puts 'yes' else puts 'no' end
Does the given point lie within the polygon?
Example:
if poly.contains? 12, 5 puts 'yes' else puts 'no' end