mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 15:03:21 -04:00
Harmonization of pull up/down and GND/VDD shapes.
This commit is contained in:
parent
a50b687ad8
commit
d9c9118e2e
@ -62,9 +62,8 @@ public class PullDownShape implements Shape {
|
|||||||
.add(WIDTH2, 1),
|
.add(WIDTH2, 1),
|
||||||
Style.NORMAL
|
Style.NORMAL
|
||||||
);
|
);
|
||||||
int o = 8;
|
graphic.drawLine(new Vector(0, HEIGHT), new Vector(0, SIZE * 2), Style.NORMAL);
|
||||||
graphic.drawLine(new Vector(0, HEIGHT), new Vector(0, SIZE + SIZE2 + o), Style.NORMAL);
|
graphic.drawLine(new Vector(-SIZE2, SIZE * 2), new Vector(SIZE2, SIZE * 2), Style.THICK);
|
||||||
graphic.drawLine(new Vector(-SIZE2, SIZE + SIZE2 + o), new Vector(SIZE2, SIZE + SIZE2 + o), Style.THICK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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.GenericShape.SIZE2;
|
||||||
import static de.neemann.digital.draw.shapes.PullDownShape.HEIGHT;
|
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.PullDownShape.WIDTH2;
|
||||||
|
import static de.neemann.digital.draw.shapes.VDDShape.DOWNSHIFT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A pull up resistor shape.
|
* A pull up resistor shape.
|
||||||
@ -55,13 +56,12 @@ public class PullUpShape implements Shape {
|
|||||||
.add(WIDTH2, -1),
|
.add(WIDTH2, -1),
|
||||||
Style.NORMAL
|
Style.NORMAL
|
||||||
);
|
);
|
||||||
int o = 4;
|
graphic.drawLine(new Vector(0, -HEIGHT), new Vector(0, DOWNSHIFT - SIZE * 2 - SIZE2), Style.NORMAL);
|
||||||
graphic.drawLine(new Vector(0, -HEIGHT), new Vector(0, -SIZE - SIZE - o), Style.NORMAL);
|
|
||||||
graphic.drawPolygon(
|
graphic.drawPolygon(
|
||||||
new Polygon(false)
|
new Polygon(false)
|
||||||
.add(-SIZE2, -SIZE - SIZE2 - o)
|
.add(-SIZE2, DOWNSHIFT - SIZE * 2)
|
||||||
.add(0, -SIZE - o - SIZE2 - SIZE * 2 / 3)
|
.add(0, DOWNSHIFT - SIZE * 2 - SIZE * 2 / 3)
|
||||||
.add(SIZE2, -SIZE - SIZE2 - o),
|
.add(SIZE2, DOWNSHIFT - SIZE * 2),
|
||||||
Style.NORMAL
|
Style.NORMAL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import static de.neemann.digital.draw.shapes.GenericShape.SIZE2;
|
|||||||
* @author hneemann
|
* @author hneemann
|
||||||
*/
|
*/
|
||||||
public class VDDShape implements Shape {
|
public class VDDShape implements Shape {
|
||||||
|
static final int DOWNSHIFT = 4;
|
||||||
private final PinDescriptions outputs;
|
private final PinDescriptions outputs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,9 +48,9 @@ public class VDDShape implements Shape {
|
|||||||
public void drawTo(Graphic graphic, boolean heighLight) {
|
public void drawTo(Graphic graphic, boolean heighLight) {
|
||||||
graphic.drawPolygon(
|
graphic.drawPolygon(
|
||||||
new Polygon(false)
|
new Polygon(false)
|
||||||
.add(-SIZE2, 0)
|
.add(-SIZE2, DOWNSHIFT)
|
||||||
.add(0, -SIZE * 2 / 3)
|
.add(0, DOWNSHIFT - SIZE * 2 / 3)
|
||||||
.add(SIZE2, 0), Style.NORMAL);
|
.add(SIZE2, DOWNSHIFT), Style.NORMAL);
|
||||||
graphic.drawLine(new Vector(0, -SIZE2), new Vector(0, 0), Style.NORMAL);
|
graphic.drawLine(new Vector(0, -SIZE2 + DOWNSHIFT), new Vector(0, 0), Style.NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user