Displaying 1 result from an estimated 1 matches for "event_x_old".
2007 Oct 02
0
[ wxruby-Patches-14375 ] bigdemo/wxScrolledWindow - paint bug with scrolled window
...def on_left_button_event_down(event)
if event.left_is_down() and !@drawing
set_focus()
set_XY(event)
@curLine = []
capture_mouse()
@drawing = true
end
end
To:
def on_left_button_event_down(event)
if event.left_is_down() and !@drawing
set_focus()
set_XY(event)
@event_x_old = event.get_x # added this to save the current absolute...
@event_y_old = event.get_y # ... mouse position
@curLine = []
capture_mouse()
@drawing = true
end
end
----
And in on_left_button_event_motion
From:
paint do | dc |
dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN&q...