Displaying 1 result from an estimated 1 matches for "get_box".
Did you mean:
get_bos
2005 Jan 22
9
Dragging images across the canvas
...quot;)
@bitmap = Wx::Bitmap.new(image)
@left_dn = false
evt_paint { on_paint }
evt_motion {|event| on_motion(event) }
evt_left_down {|event| @left_dn = true }
evt_left_up {|event| @left_dn = false }
end
def move_region(nx,ny)
ox,oy,w,h = @reg.get_box
@reg.clear
@reg = Wx::Region.new(nx,ny,nx+w,ny+h)
dc = Wx::ClientDC.new(self)
# Erase from the existing location
#
wb = Wx::WHITE_BRUSH
dc.set_brush(wb)
dc.set_pen(Wx::WHITE_PEN)
dc.draw_rectangle(ox,oy,ox+w,oy+h)
# Draw at the new locat...