use of de.neemann.digital.draw.graphics.Vector in project Digital by hneemann.
the class SevenSegShape method getPins.
@Override
public Pins getPins() {
if (pins == null) {
pins = new Pins();
pins.add(new Pin(new Vector(0, 0), inputPins.get(0)));
pins.add(new Pin(new Vector(SIZE, 0), inputPins.get(1)));
pins.add(new Pin(new Vector(SIZE * 2, 0), inputPins.get(2)));
pins.add(new Pin(new Vector(SIZE * 3, 0), inputPins.get(3)));
pins.add(new Pin(new Vector(0, SIZE * HEIGHT), inputPins.get(4)));
pins.add(new Pin(new Vector(SIZE, SIZE * HEIGHT), inputPins.get(5)));
pins.add(new Pin(new Vector(SIZE * 2, SIZE * HEIGHT), inputPins.get(6)));
pins.add(new Pin(new Vector(SIZE * 3, SIZE * HEIGHT), inputPins.get(7)));
if (commonCatode)
pins.add(new Pin(new Vector(SIZE * 4, SIZE * HEIGHT), inputPins.get(8)));
}
return pins;
}
use of de.neemann.digital.draw.graphics.Vector in project Digital by hneemann.
the class SwitchShape method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
int yOffs = 0;
if (closed) {
graphic.drawLine(new Vector(0, 0), new Vector(SIZE * 2, 0), Style.NORMAL);
} else {
yOffs = SIZE2 / 2;
graphic.drawLine(new Vector(0, 0), new Vector(SIZE * 2 - 4, -yOffs * 2), Style.NORMAL);
}
graphic.drawLine(new Vector(SIZE, -yOffs), new Vector(SIZE, -yOffs - SIZE), Style.THIN);
graphic.drawLine(new Vector(SIZE2, -yOffs - SIZE), new Vector(SIZE + SIZE2, -yOffs - SIZE), Style.THIN);
if (label != null && label.length() > 0)
graphic.drawText(new Vector(SIZE, 4), new Vector(SIZE * 2, 4), label, Orientation.CENTERTOP, Style.SHAPE_PIN);
}
use of de.neemann.digital.draw.graphics.Vector in project Digital by hneemann.
the class VDDShape method drawTo.
@Override
public void drawTo(Graphic graphic, Style heighLight) {
graphic.drawPolygon(new Polygon(false).add(-SIZE2, DOWNSHIFT).add(0, DOWNSHIFT - SIZE * 2 / 3).add(SIZE2, DOWNSHIFT), Style.NORMAL);
graphic.drawLine(new Vector(0, -SIZE2 + DOWNSHIFT), new Vector(0, 0), Style.NORMAL);
}
use of de.neemann.digital.draw.graphics.Vector in project Digital by hneemann.
the class IEEENotShape method getPins.
@Override
public Pins getPins() {
if (pins == null) {
pins = new Pins();
pins.add(new Pin(new Vector(0, 0), inputs.get(0)));
pins.add(new Pin(new Vector(SIZE * 2, 0), outputs.get(0)));
}
return pins;
}
use of de.neemann.digital.draw.graphics.Vector in project Digital by hneemann.
the class IEEEOrShape method drawIEEE.
@Override
protected void drawIEEE(Graphic graphic) {
graphic.drawLine(new Vector(0, 0), new Vector(4, 0), Style.WIRE);
graphic.drawLine(new Vector(0, SIZE * 2), new Vector(4, SIZE * 2), Style.WIRE);
if (center)
graphic.drawLine(new Vector(0, SIZE), new Vector(7, SIZE), Style.WIRE);
graphic.drawPolygon(POLYGON, Style.NORMAL);
}
Aggregations