Edward Redman
10/12/2007 3:47:00 AM
I have a question concerning ruby/tk and drawing lines on a canvas.
I tried to convert from a tcl program.
Everything works fine except that the line when its thickness is large
appears to be a series of short line segments rather than a solid line.
I have binded the "1" mouse button to start the line with the following
canvas.bind( '1', proc { |e|
$startx = e.x
$starty = e.y
})
and the motion of the mouse
canvas.bind('B1-Motion', proc { |e|
$endx = e.x
$endy = e.y
$a = TkcLine.new(canvas, $startx, $starty, $endx, $endy)
$a.width option.value
$a.fill "#{color}"
})
Can anyone see why this does not give me a solid line
--
Ed Redman
redman@accesswave.ca