A rectangular that contains all the pixel points passed as arguments
Accepts both an array of GPoint and an array of 2-element arrays
[Source]
# File lib/gm_plugin/point.rb, line 15 15: def initialize(points) 16: if !points.empty? and points[0].is_a?(Array) 17: @points = points.collect { |pt| GPoint.new(pt[0],pt[1]) } 18: else 19: @points = points 20: end 21: end
# File lib/gm_plugin/point.rb, line 22 22: def create 23: "new GBounds([#{@points.map { |pt| pt.to_javascript}.join(",")}])" 24: end
[Validate]