|Keyboard Shortcut||Menu Shortcut||Menu Location|
|Raster -> Line
Vector -> Line
The Line command draws lines of one or more segments. There are two separate Line commands – one for Image mode and one for Vector mode.
The Raster Line command generates a line as a sequence of pixels, using the current foreground color.
Activate the Raster Line command. Click the left mouse button to set a starting point. Move the mouse to the location for the end of the line segment, and click again to end that segment. You may continue to set points for the line. Press Enter or Esc, or double-click the left mouse button, to end the line.
If you just want to draw one line segment, click and hold the left mouse button for the starting point, then while continuing to press the button drag the cursor to the desired endpoint and release the button. This draws one line segment and ends the line.
Use the Ctrl key to constrain a segment to to a vertical line, or the Shift key to force the segment to a horizontal line.
Example: Set the first point of the line, and release the mouse button. Move the cursor away in any direction. Press and hold the Shift key while moving the mouse; this will force the current line segment to become horizontal. Click once while holding the Shift key to end the horizontal line segment, then release the Shift key. Now press the Ctrl key and move the mouse. The next segment will become a vertical line. Click again while holding the Ctrl key to end the vertical line segment.
The Vector Line command generates vector lines of one or more segments.
Activate the Vector Line command. Click and release the left mouse button to set a starting point. Drag the cursor to the endpoint of the line segment and click again to end the segment. Move the mouse away and a new line segment is begun from the last point. You may draw any number of connected segments in this way. Press Enter or double-click to terminate the line.
Use the Ctrl key to constrain the next point to be along a vertical line from the last point set. Use the Shift key to force the next point to lie along a horizontal line from the last point. The first point in a new line cannot be constrained by Ctrl or Shift.
Use the Esc key to erase the last point that you set. Pressing Esc when no points are set will cancel the Line tool.
Use Gravity to snap to the existing point in the vector data that is closest to the cursor’s position. Gravity may be activated in two ways – press the Period (.) key, or right-click to activate the Context menu and choose Gravity. If selected from the context menu, right-click will continue to function as Gravity until a new tool is selected.
When ending a line with the Enter key, the line ends at the last point that you set with Gravity or with a left-click, and not necessarily at the cursor’s current location. When ending a line with a double-click, the line ends at the location of the double-click.
In the Vector Line command, points are only set when you press down on the mouse button. This means that if you click, drag, and release, you have effectively only started the line segment. The segment has not been terminated at the point where you released the mouse button, but continues to follow the mouse movement; you must press the left mouse button again to set the endpoint.