# File lib/captcha.rb, line 82 def Rectangle.from_array( points ) minx = [ points[0], points[2], points[4], points[6] ].min maxx = [ points[0], points[2], points[4], points[6] ].max miny = [ points[1], points[3], points[5], points[7] ].min maxy = [ points[1], points[3], points[5], points[7] ].max x = minx y = miny width = maxx - minx height = maxy - miny Rectangle.new( x, y, width, height ) end