mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix 3-legged symbols
This commit is contained in:
Binary file not shown.
@@ -94,7 +94,6 @@ public abstract class Abstract3LegSymbol extends AbstractComponent<String> {
|
|||||||
this.body = getBody();
|
this.body = getBody();
|
||||||
applyOrientation(this.body);
|
applyOrientation(this.body);
|
||||||
}
|
}
|
||||||
Shape[] body = getBody();
|
|
||||||
|
|
||||||
AffineTransform old = g2d.getTransform();
|
AffineTransform old = g2d.getTransform();
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ public class PotentiometerSymbol extends Abstract3LegSymbol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Shape[] getBody() {
|
public Shape[] getBody() {
|
||||||
if (body == null) {
|
Shape[] body = new Shape[3];
|
||||||
body = new Shape[3];
|
|
||||||
int x = controlPoints[0].x;
|
int x = controlPoints[0].x;
|
||||||
int y = controlPoints[0].y;
|
int y = controlPoints[0].y;
|
||||||
int pinSpacing = (int) PIN_SPACING.convertToPixels();
|
int pinSpacing = (int) PIN_SPACING.convertToPixels();
|
||||||
@@ -84,7 +83,7 @@ public class PotentiometerSymbol extends Abstract3LegSymbol {
|
|||||||
polyline.lineTo(x + pinSpacing * 2 - pinSpacing * 2 / 3, y + pinSpacing / 3);
|
polyline.lineTo(x + pinSpacing * 2 - pinSpacing * 2 / 3, y + pinSpacing / 3);
|
||||||
polyline.lineTo(x + pinSpacing * 2 - pinSpacing / 3, y);
|
polyline.lineTo(x + pinSpacing * 2 - pinSpacing / 3, y);
|
||||||
body[2] = polyline;
|
body[2] = polyline;
|
||||||
}
|
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user