Search in sources :

Example 6 with Polygon

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);
}
Also used : Polygon(de.neemann.digital.draw.graphics.Polygon) Vector(de.neemann.digital.draw.graphics.Vector)

Example 7 with Polygon

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);
}
Also used : Polygon(de.neemann.digital.draw.graphics.Polygon) Vector(de.neemann.digital.draw.graphics.Vector)

Example 8 with Polygon

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);
}
Also used : Polygon(de.neemann.digital.draw.graphics.Polygon) Vector(de.neemann.digital.draw.graphics.Vector)

Example 9 with Polygon

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);
}
Also used : Style(de.neemann.digital.draw.graphics.Style) Polygon(de.neemann.digital.draw.graphics.Polygon) Vector(de.neemann.digital.draw.graphics.Vector)

Example 10 with Polygon

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);
}
Also used : Polygon(de.neemann.digital.draw.graphics.Polygon) Vector(de.neemann.digital.draw.graphics.Vector)

Aggregations

Polygon (de.neemann.digital.draw.graphics.Polygon)19 Vector (de.neemann.digital.draw.graphics.Vector)12 Style (de.neemann.digital.draw.graphics.Style)4 Pin (de.neemann.digital.draw.elements.Pin)1