On Apr 6, 2009, at 5:09 PM, Abhijit Hoskeri wrote:

You can draw on images by calling drawing functions on your image
objects. A simple example that draws whereever the mouse goes:

Shoes.app do
        @image = image('/path/to/image.jpg')
        oldx, oldy = 0, 0
        motion do |x, y|
                print "motion called: #{x}, #{y}, #{oldx}, #{oldy}\n"
                @image.line(oldx, oldy, x, y)
                oldx, oldy = x, y
                @image.show()
        end
end

Oh happy day!  That's exactly what I needed.  thanks.

wait... what's @image.show() doing there?


Reply via email to