- this.logicWidth = logicWidth;
- setSize(width, (logicWidth - 1) * heightPerPin);
- addPin(this.inputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, 0, (logicWidth - 1) * heightPerPin / 2));
+ this.logicWidth = params.logicWidth;
+ this.oc = new OrientationCalculator(toggleLeftDownAlt(params.orientation), width,
+ this.heightWithoutOC = (logicWidth - 1) * heightPerPin);
+ setSize(oc.width(), oc.height());
+ double inLineY = (logicWidth - 1) * heightPerPin / 2;
+ addPin(this.inputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, oc.newX(0, inLineY), oc.newY(0, inLineY)));