Constructor
new ABLTransistorMapper(tikzTransistor, pins, anchorNr)
Generate the "converter" for an existing TikZ transistor stencil.
Parameters:
Name | Type | Description |
---|---|---|
tikzTransistor |
Transistor | the transistor used as stencil |
pins |
Array.<Pin> | top, bottom and tap coordinate |
anchorNr |
0 | 1 | 2 | the selected anchor; 0=top, 1=bottom, 2=tap |
Properties:
Name | Type | Description |
---|---|---|
tikzTransistor |
Transistor | the transistor used as stencil |
pins |
Array.<Pin> | top, bottom and tap pin (ABL) |
anchorNr |
0 | 1 | 2 | the selected anchor; 0=top, 1=bottom, 2=tap (ABL) |
- Source:
Members
lineCrossingCoord
Calculates the coordinate where the top-bottom line crosses the orthogonal tap line. This can but does not need to be the center point.
- Source:
Methods
clone() → {ABLTransistorMapper}
Clones this instance. This is neither a shallow nor a deep clone. Only the pins are deeply cloned.
- Source:
Returns:
- the semi deep clone
- Type
- ABLTransistorMapper
mirror(mirrorX, mirrorY)
Mirror coords/pins around the anchor.
Parameters:
Name | Type | Description |
---|---|---|
mirrorX |
boolean | true to mirror |
mirrorY |
boolean | true to mirror |
- Source:
rotate(angle)
Rotate every coord around the anchor. The rotation is counter clockwise, like the default mathematical rotation.
Parameters:
Name | Type | Description |
---|---|---|
angle |
number |
- Source:
translate(vector)
Move all pins/coordinates using a vector.
Parameters:
Name | Type | Description |
---|---|---|
vector |
Coordinate | vector to add to all coordinates |
- Source:
useAsStencil(libraryName, cellName, instanceName, attributes, pins, placement, wires, nets, coords) → {Transistor}
Generate a TikZ component using this
as an stencil. The parameters are informations extracted from ABL.
Parameters:
Name | Type | Description |
---|---|---|
libraryName |
string | the ABL library name, e.g. "ads_rflib" |
cellName |
string | the librarys component name, e.g. "R" |
instanceName |
string | the instance/component name, e.g. "R1" |
attributes |
Map.<string, string> | map of all (XML) attributes |
pins |
Array.<Pin> | the pins with their name and number (position not yet set) |
placement |
Object | general component placement information |
wires |
Array.<Wire> | list of all wires |
nets |
Map.<string, Net> | list of all nets |
coords |
Array.<Coordinate> | list of all coordinates |
- Source:
Returns:
the new Transistor
- Type
- Transistor