mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user