draw leads on the top, useful for radial components

This commit is contained in:
bancika
2011-01-10 23:06:23 +00:00
parent c4cedd8946
commit 56beaa7f9b
6 changed files with 62 additions and 60 deletions
@@ -20,16 +20,16 @@ public class HookupWire extends AbstractCurvedComponent<AWG> {
public static double INSULATION_THICKNESS_PCT = 0.3;
protected AWG value = AWG._22;
@Override
protected Color getDefaultColor() {
return COLOR;
}
@Override
protected void drawCurve(CubicCurve2D curve, Graphics2D g2d) {
int thickness = (int) (Math.pow(Math.E, -1.12436 - 0.11594 * value.getValue())
* Constants.PIXELS_PER_INCH * (1 + 2 * INSULATION_THICKNESS_PCT));
* Constants.GRID * Constants.GRIDS_PER_INCH * (1 + 2 * INSULATION_THICKNESS_PCT));
g2d.setColor(color.darker());
g2d.setStroke(new BasicStroke(thickness));
g2d.draw(curve);