use of de.neemann.digital.draw.graphics.Polygon in project Digital by hneemann.
the class FGFETShapeP method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
super.drawTo(graphic, highLight);
if (programmed)
graphic.drawLine(new Vector(6, 2 * SIZE - 4), new Vector(6, 4), CHARGED_GATE);
else
graphic.drawLine(new Vector(6, 2 * SIZE - 4), new Vector(6, 4), Style.THIN);
// the arrow
graphic.drawLine(new Vector(SIZE2 + 1, SIZE), new Vector(SIZE2 + 7, SIZE), Style.THIN);
graphic.drawPolygon(new Polygon(true).add(SIZE - SIZE2 / 3 + 5, SIZE).add(SIZE2 + 7, SIZE - SIZE2 / 4).add(SIZE2 + 7, SIZE + SIZE2 / 4), Style.THIN_FILLED);
}
use of de.neemann.digital.draw.graphics.Polygon in project Digital by hneemann.
the class PullDownShape method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
graphic.drawPolygon(new Polygon(true).add(-WIDTH2, 1).add(-WIDTH2, HEIGHT).add(WIDTH2, HEIGHT).add(WIDTH2, 1), Style.NORMAL);
graphic.drawLine(new Vector(0, HEIGHT), new Vector(0, SIZE * 2), Style.NORMAL);
graphic.drawLine(new Vector(-SIZE2, SIZE * 2), new Vector(SIZE2, SIZE * 2), Style.THICK);
}
use of de.neemann.digital.draw.graphics.Polygon in project Digital by hneemann.
the class PullUpShape method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
graphic.drawPolygon(new Polygon(true).add(-WIDTH2, -1).add(-WIDTH2, -HEIGHT).add(WIDTH2, -HEIGHT).add(WIDTH2, -1), Style.NORMAL);
graphic.drawLine(new Vector(0, -HEIGHT), new Vector(0, DOWNSHIFT - SIZE * 2 - SIZE2), Style.NORMAL);
graphic.drawPolygon(new Polygon(false).add(-SIZE2, DOWNSHIFT - SIZE * 2).add(0, DOWNSHIFT - SIZE * 2 - SIZE * 2 / 3).add(SIZE2, DOWNSHIFT - SIZE * 2), Style.NORMAL);
}
use of de.neemann.digital.draw.graphics.Polygon in project Digital by hneemann.
the class DiodeShape method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
Style style = blown ? Style.DASH : Style.NORMAL;
graphic.drawPolygon(new Polygon(true).add(-SIZE2, -SIZE + 1).add(SIZE2, -SIZE + 1).add(0, -1), style);
graphic.drawLine(new Vector(-SIZE2, -1), new Vector(SIZE2, -1), style);
}
use of de.neemann.digital.draw.graphics.Polygon in project Digital by hneemann.
the class FETShapeP method drawTo.
@Override
public void drawTo(Graphic graphic, Style highLight) {
super.drawTo(graphic, highLight);
// the arrow
graphic.drawLine(new Vector(SIZE2 - 2, SIZE), new Vector(SIZE2 + 4, SIZE), Style.THIN);
graphic.drawPolygon(new Polygon(true).add(SIZE - SIZE2 / 3 + 2, SIZE).add(SIZE2 + 4, SIZE - SIZE2 / 4).add(SIZE2 + 4, SIZE + SIZE2 / 4), Style.THIN_FILLED);
}