search for: move_region

Displaying 1 result from an estimated 1 matches for "move_region".

Did you mean: remove_region
2005 Jan 22
9
Dragging images across the canvas
...image = Wx::Image.new("sk.png") @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...