better pin rendering

This commit is contained in:
Branislav Stojkovic
2019-02-03 19:45:29 +01:00
parent 81b299865c
commit a0b78a5e3d
8 changed files with 18 additions and 8 deletions
@@ -354,6 +354,7 @@ public class BridgeRectifier extends AbstractTransparentComponent<String> {
PinShape pinShape = rectifierType.getPinShape(); PinShape pinShape = rectifierType.getPinShape();
int pinSize = (int) (pinShape == PinShape.Round ? ROUND_PIN_SIZE.convertToPixels() : SQUARE_PIN_SIZE.convertToPixels()) / 2 * 2; int pinSize = (int) (pinShape == PinShape.Round ? ROUND_PIN_SIZE.convertToPixels() : SQUARE_PIN_SIZE.convertToPixels()) / 2 * 2;
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
if (!outlineMode) { if (!outlineMode) {
for (Point point : controlPoints) { for (Point point : controlPoints) {
g2d.setColor(PIN_COLOR); g2d.setColor(PIN_COLOR);
@@ -310,6 +310,7 @@ public class DIL_IC extends AbstractTransparentComponent<String> {
return; return;
} }
Area mainArea = getBody()[0]; Area mainArea = getBody()[0];
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
if (!outlineMode) { if (!outlineMode) {
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2; int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
for (Point point : controlPoints) { for (Point point : controlPoints) {
@@ -284,6 +284,7 @@ public class SIL_IC extends AbstractTransparentComponent<String> {
} }
Area mainArea = getBody()[0]; Area mainArea = getBody()[0];
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
if (!outlineMode) { if (!outlineMode) {
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2; int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
for (Point point : controlPoints) { for (Point point : controlPoints) {
@@ -218,6 +218,7 @@ public class TransistorTO1 extends AbstractTransparentComponent<String> {
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2; int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY, Constants.DEFAULT_THEME); Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY, Constants.DEFAULT_THEME);
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
for (Point point : controlPoints) { for (Point point : controlPoints) {
if (!outlineMode) { if (!outlineMode) {
g2d.setColor(PIN_COLOR); g2d.setColor(PIN_COLOR);
@@ -252,6 +252,7 @@ public class TransistorTO3 extends AbstractTransparentComponent<String> {
} }
int pinSize = (int) PIN_DIAMETER.convertToPixels() / 2 * 2; int pinSize = (int) PIN_DIAMETER.convertToPixels() / 2 * 2;
Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY, Constants.DEFAULT_THEME); Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY, Constants.DEFAULT_THEME);
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
for (Point point : controlPoints) { for (Point point : controlPoints) {
if (!outlineMode) { if (!outlineMode) {
@@ -250,6 +250,7 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
return; return;
} }
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2; int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1f));
if (!outlineMode) { if (!outlineMode) {
for (Point point : controlPoints) { for (Point point : controlPoints) {
Binary file not shown.
+4
View File
@@ -2402,6 +2402,10 @@
<changeType>IMPROVEMENT</changeType> <changeType>IMPROVEMENT</changeType>
<description>Automatically select dropped components from the component tree after they get placed</description> <description>Automatically select dropped components from the component tree after they get placed</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Better rendering of IC and transistor pins when zoomed in</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType> <changeType>BUG_FIX</changeType>
<description>Drag&amp;Drop from the tree sometimes picks up a wrong component type</description> <description>Drag&amp;Drop from the tree sometimes picks up a wrong component type</description>