---
title: "Lines and polygons"
description: "Draw lines, arrows, connectors and free outlines with your own points, line ends and fills."
canonical_url: "https://docs.ols.yonn.online/en/build/lines-and-polygons"
---
# Lines and polygons

> Draw lines, arrows, connectors and free outlines with your own points, line ends and fills.

Lines and polygons are objects you draw point by point. Use them for arrows that point at something, connectors in a diagram, an outline around part of a picture or any free shape. There are four tools:

- **Line**: a straight line.
- **Arrow**: a line with an arrowhead at the end.
- **Polyline**: an open line with several points, for example a connector with corners.
- **Polygon**: a closed, filled shape from your own points.

![The Lines menu on the Insert tab with Line, Arrow, Polyline and Polygon](https://docs.ols.yonn.online/screenshots/en/lines-and-polygons-tools.png)

## Draw one in 3 steps

<procedure>

### Pick a tool

Open <ui-path icon="i-lucide-spline" path="Insert > Lines">



</ui-path>

 and choose **Line**, **Arrow**, **Polyline** or **Polygon**.

### Draw on the slide

For **Line** and **Arrow**: press on the slide at the start point and drag to the end point. For **Polyline** and **Polygon**: click once for every point.

### Finish

A line is done when you let go. A polyline or polygon is done with a double-click, <key-combo keys="Enter">



</key-combo>

 or the **Finish** button. **Cancel** or <key-combo keys="Esc">



</key-combo>

 stops drawing.

</procedure>

## Keys while drawing

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <key-combo keys="Shift">
        
      </key-combo>
    </td>
    
    <td>
      Keeps lines at 45-degree steps (straight, diagonal).
    </td>
  </tr>
  
  <tr>
    <td>
      <key-combo keys="Enter">
        
      </key-combo>
      
       or double-click
    </td>
    
    <td>
      Finishes a polyline or polygon.
    </td>
  </tr>
  
  <tr>
    <td>
      <key-combo keys="Backspace">
        
      </key-combo>
    </td>
    
    <td>
      Removes the last point you set.
    </td>
  </tr>
  
  <tr>
    <td>
      <key-combo keys="Esc">
        
      </key-combo>
    </td>
    
    <td>
      Cancels drawing.
    </td>
  </tr>
</tbody>
</table>

## Change the points

Select the line or polygon. Its points appear on the slide.

<table>
<thead>
  <tr>
    <th>
      What you want
    </th>
    
    <th>
      How
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Move a point
    </td>
    
    <td>
      Drag it, or select it and use the arrow keys.
    </td>
  </tr>
  
  <tr>
    <td>
      Add a point
    </td>
    
    <td>
      Click the small plus point between two points.
    </td>
  </tr>
  
  <tr>
    <td>
      Remove a point
    </td>
    
    <td>
      Double-click it, or select it and press <key-combo keys="Del">
        
      </key-combo>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      Change direction or length of a line
    </td>
    
    <td>
      Drag its start or end point.
    </td>
  </tr>
</tbody>
</table>

## Format tab

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Start
      </strong>
      
       and <strong>
        End
      </strong>
    </td>
    
    <td>
      The decoration at the first and last point: <strong>
        None
      </strong>
      
      , <strong>
        Arrow
      </strong>
      
      , <strong>
        Dot
      </strong>
      
       or <strong>
        Diamond
      </strong>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Swap ends
      </strong>
    </td>
    
    <td>
      Turns the line around: the start becomes the end.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Closed
      </strong>
    </td>
    
    <td>
      Connects the last point with the first and fills the area. Switch it off for an open polyline.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Rounded
      </strong>
    </td>
    
    <td>
      Round line ends and corners.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Appearance
      </strong>
    </td>
    
    <td>
      Color, width and dashes of the line, and the fill of a closed polygon.
    </td>
  </tr>
</tbody>
</table>

Lines and polygons can also have states (for example red when the mouse is over them), animations, motion paths and triggers, like any other object.

<hint-box kind="tip" title="Accessibility">

A connector that carries meaning in a diagram needs an **Alt text**. A purely decorative line should be marked **Decorative**.

</hint-box>

<hint-box kind="ai" title="With AI">

An AI app can draw lines with exact slide coordinates. The tool `connect_objects` draws a connector from the edge of one object to the edge of another, optionally with a label. See [MCP tools](https://docs.ols.yonn.online/en/ai/mcp-tools).

</hint-box>

## If something doesn't work

<table>
<thead>
  <tr>
    <th>
      Problem
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      My polygon is not filled
    </td>
    
    <td>
      <strong>
        Closed
      </strong>
      
       is off. Switch it on in the Format tab.
    </td>
  </tr>
  
  <tr>
    <td>
      The arrowhead points the wrong way
    </td>
    
    <td>
      Click <strong>
        Swap ends
      </strong>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      I keep adding points instead of finishing
    </td>
    
    <td>
      Double-click the last point or press <key-combo keys="Enter">
        
      </key-combo>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      The line jumps to odd angles
    </td>
    
    <td>
      You are holding <key-combo keys="Shift">
        
      </key-combo>
      
      , or <strong>
        Snap to grid
      </strong>
      
       is on. Switch it off in the bar below the slide.
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://docs.ols.yonn.online/sitemap.md) for all pages.
