Skip to content

Instantly share code, notes, and snippets.

@kingcu
Created November 27, 2011 21:55
Show Gist options
  • Save kingcu/1398221 to your computer and use it in GitHub Desktop.
Save kingcu/1398221 to your computer and use it in GitHub Desktop.
puts "before normalized_path.size"
if @normalized_path.size > 0
if @normalized_path.size > 2 #remember, using x,y concurrently in same array, so this means we have more than 1 point
larger = @width < @height ? @height : @width
stroke_width = (larger < 300 ? 1 : (larger >= 300 and larger < 600) ? 2 : 3)
gc = Draw.new
gc.stroke(stroke_color)
gc.stroke_width(stroke_width)
gc.fill_opacity(0)
gc.polyline(*@normalized_path)
gc.draw(img_copy)
puts "inside normalized_path.size block"
end
puts "after normalized_path.size"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment