# Panning, Zoom, Ruler and Units

- Panning the Canvas
  - Rulers
  - Panning with Keyboard
  - Pan to the Origin
  - Negative Coordinate
- Zooming
  - Zoom to Fit Canvas
  - Zoom in
  - Zoom out
  - Unzoom
- Units
  - UNIT box
  - Set Units

## Panning the Canvas

### Rulers

The rulers are placed at the top and right (left, if the drawing mode panel is right) of the canvas, and the scale selected by Units is displayed on them (i.e. inches or cm). Normally, triangular markers which show the mouse cursor position are also displayed on the rulers. The rulers may also be used to scroll the canvas.

To scroll the canvas, press mouse button 2 (`Drag') on the ruler and move cursor left/right or up/down; the ruler will be moved following the cursor, and the contents of canvas will be moved when mouse button is released. If the SHIFT key was pressed during this operation, the canvas will scroll five times further than the mouse movement.

Clicking on the ruler with mouse button 1 (`Pan Left' or `Pan Up') or mouse button 3 (`Pan Right' or `Pan Down') will scroll the canvas by 1/2 inch (1cm, if unit is cm). The arrow keys have the same effect, too. If the SHIFT key was pressed during those operations, amount of scroll will be five times further.

If xfig is compiled with wheel mouse support and you have a wheel-mouse, then rotating the wheel backward on the canvas will scroll the canvas up, and rotating the wheel forward will scroll the canvas down.

### Panning with Keyboard

The canvas may be panned left, right, up, or down by pressing the respective arrow keys while the mouse pointer is in the canvas. If the SHIFT key was pressed during those operations, amount of scroll will be five times further.

Panning may be done by clicking rulers with mouse button 1 or 3, too.

### Pan to the Origin

The canvas view will be moved to the origin if mouse button 1 (`Pan to Origin') is clicked on the UNIT box, or mouse button 2 (`Pan to Origin') is clicked on the canvas while the CONTROL key is down. Selecting Pan to origin from the View menu will achieve the same action.

### Negative Coordinate

By default, xfig will allow panning into negative coordinates.

This may be turned off by either starting xfig with the `-dontallownegcoords` option, or unchecking the box in the Global Settings panel.

## Zooming

The canvas may be zoomed/unzoomed by setting the zoom scale with the Zoom Scale button in the Attribute panel. Here are description of some shortcuts to zooming and unzooming quickly.

### Zoom to Fit Canvas

- To zoom the figure just fill the canvas, choose Zoom to Fit canvas from the View menu, or use accelerator `Ctrl-Z`.

- Fit to canvas button on the Zoom dialog has the same function.

### Zoom In

- Click Zoom Scale in the Attribute panel with mouse button 3 (`Inc/Next').

- Choose Zoom in from the View menu, or use accelerator `Shift-Z`.

- While holding the control key down click mouse button 1 (`zoom area') on one corner of a rectangle, drag the mouse to the opposite corner and click mouse button 1 (`final point') again. The area in the rectangle will be zoomed to fit the canvas.

- If xfig is compiled with wheel mouse support and you have a wheel-mouse, then rotating the wheel backward on the canvas while the control key is pressed will zoom the canvas in around the pointer.

### Zoom Out

- Click Zoom Scale in the Attribute panel with mouse button 2 (`Dec/Prev').

- Choose Zoom out from the View menu, or use accelerator `Z`.

- If xfig is compiled with wheel mouse support and you have a wheel-mouse, then rotating the wheel forward on the canvas while the control key is pressed will zoom the canvas out.

### Unzoom

- Choose Unzoom from the View menu.

- Click mouse button 3 (`Unzoom') on the canvas while pressing the CONTROL key.

## Units

### UNIT box

The Units box is placed where the top and side rulers meet. The units of the ruler (in or cm) and the scale of the drawing (e.g. 1cm=3km) will be displayed here.

### Set Units

Clicking on the Units box with mouse button 3 (`Set Units/Scale') will pop up a panel to set the units. This panel is also available from the Edit Menu

Ruler units
  Select ruler unit from Imperial (fraction), Imperial (decimal) or Metric (cm). When Imperial (fraction) is chosen, then fractions of the units will be shown in measurement messages, e.g. 3-5/8 in, or 3 ft 7-1/2 in For the other choices, decimal values are shown, e.g. 3.3242 cm.
Figure units
  Select unit which is used to display dimensions when entering or editing object, from Ruler units and User defined. If User defined is selected here, the string entered in Unit name will be displayed as the unit of dimension.
Unit name
  Set the name of the unit. This is effective only if User defined is selected in Figure units.
Use fractions
  If the Ruler units is Imperial (in), you may have xfig display measurements using fractions where possible. If a measurement can be shown as an integer multiple of 64ths of an inch (or 32nds, 16ths, etc.) it will show it as such (e.g. 3-5/64 in), otherwise a decimal value will be shown (e.g. 3.085 in).
Figure scale
  Choose the scale which is used to display dimensions when entering or editing objects, from Unity and User defined. If User defined is selected here, the value specified by Scale factor will be multiplied by the dimensions displayed when drawing objects.
Scale factor
  Set the value which will be multiplied by the dimensions when displaying them. This is effective only if User defined is selected as Figure scale.

As an exmple, in the above panel Ruler units are Imperial (fraction), Figure units are User defined, Unit name is "ft" (feet), Figure scale is User defined and Scale factor is 2.0, so when drawing, 1 inch will be reported as 2 ft., and 1-7/16 inch will be reported as 2 ft 10-1/2 in.

The default values for this panel can be set by command line options and resources.

[ Contents | Introduction | Credits ]