class GerbilCharts::SVGDC::SVGSquarizedPolygon
Public Instance Methods
addpoint(x,y)
click to toggle source
# File lib/gerbilcharts/svgdc/svg_polygon.rb, line 43 def addpoint(x,y) @lastpt ||= [] # truncate to 2 significant places (cuts down SVG size) s = " #{POLYGON_RESOLUTION%x}, #{POLYGON_RESOLUTION%y} " unless s == @last_svg or @lastpt.empty? @operstring << " #{POLYGON_RESOLUTION%x}, #{POLYGON_RESOLUTION%@lastpt[1]} " @operstring << s end @lastpt = [x,y] @last_svg = s end