node/lib/metasm/metasm/gui/dasm_graph.rb
def zoom_all
		minx, miny, maxx, maxy = @curcontext.boundingbox
		minx -= @margin
		miny -= @margin
		maxx += @margin
		maxy += @margin

		@zoom = [width.to_f/(maxx-minx), height.to_f/(maxy-miny)].min
		@zoom = 1.0 if @zoom > 1.0 or (@zoom-1.0).abs < 0.1
		@curcontext.view_x = minx + (maxx-minx-width/@zoom)/2
		@curcontext.view_y = miny + (maxy-miny-height/@zoom)/2
		redraw
	end
# update the zoom & view_xy to show the whole graph in the window
update the zoom & view_xy to show the whole graph in the window
update the zoom & view_xy to show the whole graph in the window
def zoom_all
		minx, miny, maxx, maxy = @curcontext.boundingbox
		minx -= @margin
		miny -= @margin
		maxx += @margin
		maxy += @margin
		@zoom = [width.to_f/(maxx-minx), height.to_f/(maxy-miny)].min
		@zoom = 1.0 if @zoom > 1.0 or (@zoom-1.0).abs < 0.1
		@curcontext.view_x = minx + (maxx-minx-width/@zoom)/2
		@curcontext.view_y = miny + (maxy-miny-height/@zoom)/2
		redraw
	end
def zoom_all minx , miny , maxx , maxy = @curcontext . boundingbox minx -= @margin miny -= @margin maxx += @margin maxy += @margin @zoom = [ width . to_f / ( maxx - minx ) , height . to_f / ( maxy - miny ) ] . min @zoom = 1.0 if @zoom > 1.0 or ( @zoom - 1.0 ) . abs < 0.1 @curcontext . view_x = minx + ( maxx - minx - width / @zoom ) / 2 @curcontext . view_y = miny + ( maxy - miny - height / @zoom ) / 2 redraw end
update the zoom & view_xy to show the whole graph in the window
update the zoom & view_xy to show the whole graph in the window