LayerSpec¶
- class photonforge.LayerSpec(layer, description, color, pattern)¶
Layer specification.
This class is mainly used to create layers for a
Technology
.- Parameters:
layer (tuple[int, int]) – Sequence of 2 integers describing layer and datatype (or texttype) numbers.
description (str) – Layer description.
color (str | tuple[int, int, int] | tuple[int, int, int, int]) – Layer display color. It can be a string of hexadecimal values in the formats ‘RGBA’ or ‘RRGGBBAA’ (with an optional ‘#’ prefix), or a tuple with 3 or 4 non-negative integers for each component.
pattern (str) – Hatch pattern used to display the layer. Must be one of ‘solid’, ‘hollow’, ‘\’, ‘\\’, ‘/’, ‘//’, ‘-’, ‘=’, ‘x’, ‘xx’, ‘+’, ‘++’, ‘.’, or ‘:’.
Example
>>> layer_spec = LayerSpec((1, 0), "Silicon layer", "#d2132e18", "//")
See also
Methods
Attributes
Layer display color.
LayerSpec description.
(DEPRECATED) Json representation of this layer specification.
Layer and datatype tuple.
Layer display pattern.
Object properties.
- color¶
Layer display color.
- Type:
ndarray
- description¶
LayerSpec description.
- Type:
str
- static from_json(json_str)¶
Import object data from json.
Warning
This method is DEPRECATED and will be removed in the next release.
- Parameters:
json_str (str) – String containing the json data.
- Returns:
PhotonForge object.
- Return type:
Any
- json¶
(DEPRECATED) Json representation of this layer specification.
- Type:
str
- layer¶
Layer and datatype tuple.
- Type:
tuple[int, int]
- pattern¶
Layer display pattern.
- Type:
str
- properties¶
Object properties.
- Type: