From 58a615b5488b61ba8aea3e8e5f3ffbda7acf6ffa Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 26 May 2018 21:45:08 -0500 Subject: [PATCH] update symbol shape updating the symbol shape and fixing a naming error from previously wrong file upload --- .../diylc/components/semiconductors/PhotoDiodeSymbol.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/diylc/diylc-library/src/org/diylc/components/semiconductors/PhotoDiodeSymbol.java b/diylc/diylc-library/src/org/diylc/components/semiconductors/PhotoDiodeSymbol.java index ab6d64d3..c330af4b 100644 --- a/diylc/diylc-library/src/org/diylc/components/semiconductors/PhotoDiodeSymbol.java +++ b/diylc/diylc-library/src/org/diylc/components/semiconductors/PhotoDiodeSymbol.java @@ -24,7 +24,7 @@ import org.diylc.core.annotations.KeywordPolicy; transformer = SimpleComponentTransformer.class ) -public class PhotoDiodesymbol extends DiodeSymbol { +public class PhotoDiodeSymbol extends DiodeSymbol { private static final long serialVersionUID = 1L; @@ -42,14 +42,14 @@ public class PhotoDiodesymbol extends DiodeSymbol { // lower arrow int x2 = (int) (d / 2 + Math.cos(Math.PI / 4) * arrowLength); int y2 = (int) (width + Math.sin(Math.PI / 4) * arrowLength); - g2d.drawLine(d / 2, (int) width, x2 - 2, y2 - 2); - g2d.fillPolygon(new Polygon(new int[] {x2 - 2, x2 - 2, (int) (x2 + arrowSize)}, new int[] {y2 - 2, (int) (y2 + arrowSize), y2 - 2},3)); + g2d.drawLine(d / 2, (int) width, x2 , y2); + g2d.fillPolygon(new Polygon(new int[] {d / 2, (int) ((d / 2) + arrowSize), d / 2}, new int[] {(int) width, (int) width, (int) (width + arrowSize)},3)); //upper arrow x2 = (int) (3 * d / 2 + Math.cos(Math.PI / 4) * arrowLength); y2 = (int) (width + Math.sin(Math.PI / 4) * arrowLength); g2d.drawLine(3 * d / 2, (int) width, x2 - 2, y2 - 2); - g2d.fillPolygon(new Polygon(new int[] {x2 - 2, x2 - 2, (int) (x2 + arrowSize)}, new int[] {y2 - 2, (int) (y2 + arrowSize), y2 - 2},3)); + g2d.fillPolygon(new Polygon(new int[] {3 * d / 2, (int) ((3 * d / 2) + arrowSize), 3 * d / 2}, new int[] {(int) width, (int) width, (int) (width + arrowSize)},3)); } @Override