Algorithmic Solutions > LEDA > LEDA Guide > GraphWin > Programming Interface > Zoom Operations

Zoom Operations

The Zoom Operations of GraphWin change the coordinate system of the window but do not change the layout of the graph. A zoom operation is a combination of a stretch or shrink transformation with a translation of the window.

Operations

The operation
    void gw.zoom(double f);
zooms the window by the factor f; this multiplies the scaling factor by f and leaves the coordinates of the center of the window unchanged.
    void gw.zoom_area(double x0, double y0, double x1, double y1);
zooms the window to rectangle (x0,y0,x1,y1).
    void.center_graph();
performs a zoom operation that moves the center of the bounding box of the current graph layout to the center of the window without changing the scaling of the window.
    void gw.zoom_graph();
calls gw.zoom_graph(x0,y0,x1,y1); such that x0, x1, and y0 are the left, right, and lower coordinates of the bounding box of the current layout of the graph.

Animation of Zoom Operations

GraphWin animates the zoom operations. The parameter animation_steps controls this animation. If animation_steps is zero, the layout change is performed instantaneously. The operation
	int gw.set_animation_steps(int s);
allows to change the parameter animation_steps.

See also:

GraphWin

Programming Interface

Attributes and Parameters

Layout Operations


Graph Data Types


Windows and Panels

Pixel and User Coordinates


Manual Pages:

Manual Page GraphWin




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH