Shapes and Paths

DGLux5 allows you to create and edit simple shapes and paths. For more complex graphics, you can load image files, including SVG files, using the image component.

The following kinds of shapes and paths can be created within DGLux5:


About Default Stroke and Fill

When you create a new shape or path using the Tools panel, the new object uses the default stroke and fill, unless it is a polyline. The default stroke and fill is a collection of four property settings. When you change the value of one of these four properties for any DGLux5 element, the new value becomes the new default for that particular property. Alternatively, to change any of the four defaults, you can click the Default Stroke and Fill icon in the Tools panel and use the pop-up dialog.


The default stroke and fill in the Tools panel

The four properties are:

  • The Fill (all settings within the Fill dialog)

  • The Border (all settings within the Solid Color section of the Border dialog)

  • The Stroke Style

    Exception

    When you change the Stroke Style property to None, the previous value remains the default.

  • The Border Width

You can read more about these properties here.


Rectangles and Ellipses

To create a rectangle or ellipse, use the Rectangle tool or Ellipse tool to click and drag in the Document window.

To create a square or circle, hold Shift while creating a rectangle or ellipse.

The new shape has the current default stroke and fill.


Rectangles and ellipses in DGLux5


Lines

To create a straight line segment, use the Line tool.

Click and drag. The line will finish when you release the mouse. Alternatively, you can click once to start the line and a second time to finish it.

The new line has the current default stroke.


Lines in DGLux5


Paths and Polylines

Paths and polylines are sequences of straight and curved lines that can be closed or open. The difference between paths and polylines is that paths use the default stroke and fill, whereas polylines use the default stroke but are not filled by default.


Paths and polylines in DGLux5

Creating Paths and Polylines

To create a path or polyline:

  1. Use the Path tool or the Polyline tool.
  2. Click in the Document window to start creating the sequence.

  3. Click to add additional points with straight line segments in between them.

  4. Click and drag to create tangents of curves that are part of the path.

  5. Finish the sequence by doing one of the following:
    • Press Enter to finish the path without closing it.

    • Double-click to create a final point as well as a straight line between the first and last points, closing the shape.

    • Create the final point in the same location as the first point. The point will turn blue when the cursor is in the right place.

Tip

If you start creating a path by accident, press Escape to cancel the path.

Editing Paths and Polylines

To edit a path or polyline, use the Path Selection tool.

Moving Points

  • Click and drag points to change the path.

Changing Straight Lines Segments to Curves

  • Right-click the the point where two straight line segments meet, to add tangents at this point.


Editing Curves

  • Right-click the point where tangents meet, to allow the tangents to be edited separately.

  • After splitting a tangent, drag the ends of the two tangents to move them.

  • Right-click and select Align Tangents to re-combine tangents that you have split.


Changing Curves to Straight Line Segments

  • Right-click the point where tangents meet, to remove the tangents. This turns the two curves that meet at this point into straight line segments.

    You can also right-click the end of one of the tangents that you have split to remove just that tangent.


Splitting Paths

  • Right-click any point to split the path at this point.



SVG Shapes

To create SVG shapes, use the Shape tool menu to create quadrilaterals, ellipses, and triangles that are SVGs.

By default, quadrilaterals are rectangles, and triangles are isosceles. To create a square, circle, or equilateral triangle, hold Shift while creating the shape.

To create a scalene triangle or a non-rectangular quadrilateral, first create the shape and then drag the vertices using the Path Selection tool. You can also use the Path Selection tool to edit the curves in an ellipse.


SVG shapes in DGLux5