Class Reference layer

Setup class of a single layer. More...

Member

int blue()
void disable()
void enable()
int get3dLevel()
int get3dThickness()
int getStyle()
int green()
bool isConductor()
bool isEnabled()
bool isVia()
int mapToDatatype
int mapToLayer
string name
void set3dView(int level,int thickness)
int red()
void setColor(int red, int green, int blue)
void setStyle(int style)
string shortkey
bool visible

Detailed Description

This class is the setup for the display of a single layer. Each layer can accessed via the class layers. Example:

layers::num[5].name="Layer Number 5";

The class layer can not be used as type, so new instances of the layer class cannot be created. Layer setting are global and will affect all open LayoutEditor windows.

Some scripting languages are not able to handle an array of classes. In that case the individual layers can be accessed with the number method. Here is an example for Python scripting:

layers.number(9).name="layer nine"

Member Function Documentation


int layer::blue()

Returns: the blue part of the layer color.


void layer::disable()

The layer will be disabled and not be displayed in the menus/toolbars.


void layer::enable()

The layer will be enabled and be displayed in the menus/toolbars.


int layer::get3dLevel()

Returns: the level of the layer in the 3d view


int layer::get3dThickness()

Returns: the thickness of the layer in the 3d view


int layer::getStyle()

The style/filling of a layer can read via this method.

Returns: the style number is returned. See setStyle for details on available styles.


int layer::green()

Returns: the green part of the layer color.


bool layer::isConductor()

Returns: true, if the layer is a conductor.


bool layer::isEnabled()

Returns: true, if the layer is enabled.


bool layer::isVia()

Returns: true, if the layer is a via.


int layer::mapToDatatype

If the option "gds map layer" or "oasis map layer" is active, the layer is mapped to this datatype. If datatype is set lower than 0, all datatypes are mapped and saved with datatype 0


int layer::mapToLayer

If the option "gds map layer" or "oasis map layer" is active, the layer is mapped to this value.


string layer::name

The name of a layer is hold here.


void layer::set3dView(int level,int thickness)

The height level and the thickness of the layer ist set. The values are used for the 3dView and some calulations like the Extraction of Capacitance.


int layer::red()

Returns: the red part of the layer color.


void layer::setColor(int red, int green, int blue)

The color of a layer can modified via method.

Parameter:
red the red component
green the green component
blue the blue component

void layer::setStyle(int style)

The style/filling of a layer can modified via this method. 40 diffent fillstyles are supported:

row one has the style number 0 to 9 (from left to right), row two the number 10 to 19 and so on.

layer fill styles


string layer::shortkey

shortkey for this layer used in the layer-shortkey functions.


bool layer::visible

The visibility of a layer can modified via this value.