mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
improved lead drawing
This commit is contained in:
+2
-2
@@ -72,7 +72,7 @@ public class AxialFilmCapacitor extends AbstractLeadedComponent<Capacitance> {
|
||||
|
||||
@Override
|
||||
protected Shape getBodyShape() {
|
||||
return new Rectangle2D.Double(0f, 0f, getWidth().convertToPixels(), getHeight()
|
||||
.convertToPixels());
|
||||
return new Rectangle2D.Double(0f, 0f, getWidth().convertToPixels(),
|
||||
getClosestOdd(getHeight().convertToPixels()));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class RadialCeramicDiskCapacitor extends AbstractLeadedComponent<Capacita
|
||||
|
||||
@Override
|
||||
protected Shape getBodyShape() {
|
||||
return new Ellipse2D.Double(0f, 0f, getWidth().convertToPixels(), getHeight()
|
||||
.convertToPixels());
|
||||
return new Ellipse2D.Double(0f, 0f, getWidth().convertToPixels(), getClosestOdd(getHeight()
|
||||
.convertToPixels()));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ public class RadialFilmCapacitor extends AbstractLeadedComponent<Capacitance> {
|
||||
@Override
|
||||
protected Shape getBodyShape() {
|
||||
double radius = getHeight().convertToPixels() * 0.7;
|
||||
return new RoundRectangle2D.Double(0f, 0f, getWidth().convertToPixels(), getHeight()
|
||||
.convertToPixels(), radius, radius);
|
||||
return new RoundRectangle2D.Double(0f, 0f, getWidth().convertToPixels(),
|
||||
getClosestOdd(getHeight().convertToPixels()), radius, radius);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
|
||||
|
||||
@Override
|
||||
protected Shape getBodyShape() {
|
||||
return new Rectangle2D.Double(0f, 0f, getWidth().convertToPixels(), getHeight()
|
||||
.convertToPixels());
|
||||
return new Rectangle2D.Double(0f, 0f, getWidth().convertToPixels(),
|
||||
getClosestOdd(getHeight().convertToPixels()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user