Chapter 10. Managing Layers
Prev |  | Next

# Chapter 10. Managing Layers

## 10.1. Introduction to Layers

In Dia, diagrams consist of the canvas object, layer objects, and diagramming element objects. The layer object can be likened to that of a sheet that sits on top of a canvas. Each sheet can then have diagramming elements added to it to make up a diagram. Each diagram consists of at least one layer and each diagram can consist of as many layers as required by the diagramming author.

As a general purpose, layers aim at being a shortcut for grouping related objects within a diagram. They allow you to isolate the different parts of a diagram, in the way which you can decide to show only certain parts of it and not some others will stay hidden even when exporting or printing the diagram.

Use the --show-layers command line switch to control which layers are visible when batch exporting.

Inside a layer, any operation you would like to perform on objects are possible through the Main Popup Menu, then you can act on objects just the way you use to.

Only objects present in the current layer can be selected. If an object doesn't want to be selected, you should check if it is laying in the current layer or not.

Each new diagram comes with the default layer labeled "Background". Of course you can change its name and settings to customize it to your needs as you can do with any other layer.

You can use layers to create overlay slide show by drawing each incremental slide in a layer and manipulating which layers are visible. If you want to automate post processing such slide show, you can use --show-layers command line switch. For example: dia --show-layers=Background,Slide3 --filter=eps-builtin --export=foo.eps foo.dia will export the Background and Slide3 layers, i.e. the eps output has only these two layers and none others. You would then repeat the export for each combination of layers you need to produce your slides. Using this switch and a shell script or Makefile you can automate the export process quite well.

Prev |  | Next
Chapter 9. Customization | Home | 10.2. Managing Layers Basics