mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 02:02:16 +10:00
icon
This commit is contained in:
+7
-1
@@ -92,7 +92,7 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
body = null;
|
body = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name="Pin spacing")
|
@EditableProperty(name = "Pin spacing")
|
||||||
public Size getPinSpacing() {
|
public Size getPinSpacing() {
|
||||||
if (pinSpacing == null) {
|
if (pinSpacing == null) {
|
||||||
pinSpacing = new Size(0.1, SizeUnit.in);
|
pinSpacing = new Size(0.1, SizeUnit.in);
|
||||||
@@ -314,6 +314,12 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
g2d.fill(area);
|
g2d.fill(area);
|
||||||
g2d.setColor(BORDER_COLOR);
|
g2d.setColor(BORDER_COLOR);
|
||||||
g2d.draw(area);
|
g2d.draw(area);
|
||||||
|
g2d.setColor(PIN_COLOR);
|
||||||
|
int pinSize = 2 * width / 32;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
g2d.fillOval(width / 2 - pinSize / 2, (height / 4) * (i + 1),
|
||||||
|
pinSize, pinSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Body")
|
@EditableProperty(name = "Body")
|
||||||
|
|||||||
Reference in New Issue
Block a user