Harmonization of pull up/down and GND/VDD shapes.

This commit is contained in:
hneemann 2017-03-20 15:57:23 +01:00
parent a50b687ad8
commit d9c9118e2e
3 changed files with 12 additions and 13 deletions

View File

@ -62,9 +62,8 @@ public class PullDownShape implements Shape {
.add(WIDTH2, 1),
Style.NORMAL
);
int o = 8;
graphic.drawLine(new Vector(0, HEIGHT), new Vector(0, SIZE + SIZE2 + o), Style.NORMAL);
graphic.drawLine(new Vector(-SIZE2, SIZE + SIZE2 + o), new Vector(SIZE2, SIZE + SIZE2 + o), Style.THICK);
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);
}
}

View File

@ -15,6 +15,7 @@ import static de.neemann.digital.draw.shapes.GenericShape.SIZE;
import static de.neemann.digital.draw.shapes.GenericShape.SIZE2;
import static de.neemann.digital.draw.shapes.PullDownShape.HEIGHT;
import static de.neemann.digital.draw.shapes.PullDownShape.WIDTH2;
import static de.neemann.digital.draw.shapes.VDDShape.DOWNSHIFT;
/**
* A pull up resistor shape.
@ -55,13 +56,12 @@ public class PullUpShape implements Shape {
.add(WIDTH2, -1),
Style.NORMAL
);
int o = 4;
graphic.drawLine(new Vector(0, -HEIGHT), new Vector(0, -SIZE - SIZE - o), Style.NORMAL);
graphic.drawLine(new Vector(0, -HEIGHT), new Vector(0, DOWNSHIFT - SIZE * 2 - SIZE2), Style.NORMAL);
graphic.drawPolygon(
new Polygon(false)
.add(-SIZE2, -SIZE - SIZE2 - o)
.add(0, -SIZE - o - SIZE2 - SIZE * 2 / 3)
.add(SIZE2, -SIZE - SIZE2 - o),
.add(-SIZE2, DOWNSHIFT - SIZE * 2)
.add(0, DOWNSHIFT - SIZE * 2 - SIZE * 2 / 3)
.add(SIZE2, DOWNSHIFT - SIZE * 2),
Style.NORMAL
);
}

View File

@ -20,7 +20,7 @@ import static de.neemann.digital.draw.shapes.GenericShape.SIZE2;
* @author hneemann
*/
public class VDDShape implements Shape {
static final int DOWNSHIFT = 4;
private final PinDescriptions outputs;
/**
@ -48,9 +48,9 @@ public class VDDShape implements Shape {
public void drawTo(Graphic graphic, boolean heighLight) {
graphic.drawPolygon(
new Polygon(false)
.add(-SIZE2, 0)
.add(0, -SIZE * 2 / 3)
.add(SIZE2, 0), Style.NORMAL);
graphic.drawLine(new Vector(0, -SIZE2), new Vector(0, 0), Style.NORMAL);
.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);
}
}