Class Reference layerTranslator

Layer translator class for mapping layers. More...

Member

layerTranslator()
void clear()
void invert()
void mapAll(int to_layer)
void mapLayer(int from_layer, int to_layer)
int map(int from_layer)

Detailed Description

This class is used for the layer mapping functions is the classes class drawingField and class cell. A single instance of the class will define layer mapping for any available layer. After construction of the class an identical mapping is set for all layers.

Example:

layerTranslator t;
t.mapLayer(18,19);
t.mapLayer(19,18);
layout->drawing->mapLayer(&t);

Member Function Documentation


layerTranslator::layerTranslator()

Creates a layerTranslator instance with an identical mapping for all layers.


void layerTranslator::clear()

Reset the mapp to with an identical mapping for all layers. (introduced with release 20181119)


void layerTranslator::invert()

The layer translationg is inverted. For example if the class contains a single mapping from layer 1 to layer 2, the inverted class will contain a single mapping from layer 2 to layer 1.


void layerTranslator::mapAll(int to_layer)

Sets the mapping of all layer to to_layer.


void layerTranslator::mapLayer(int from_layer, int to_layer)

Sets a mapping of from_layer to to_layer.


int layerTranslator::map(int from_layer)

Returns: the resulting layer transformation of the from_layer