mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
photo diode minor improvement
This commit is contained in:
@@ -33,12 +33,12 @@ import org.diylc.core.annotations.ComponentDescriptor;
|
|||||||
import org.diylc.core.annotations.KeywordPolicy;
|
import org.diylc.core.annotations.KeywordPolicy;
|
||||||
|
|
||||||
@ComponentDescriptor(
|
@ComponentDescriptor(
|
||||||
name = "PhotoDiode",
|
name = "Photo Diode",
|
||||||
author = "N9XYP",
|
author = "N9XYP",
|
||||||
category = "Schematic Symbols",
|
category = "Schematic Symbols",
|
||||||
creationMethod = CreationMethod.POINT_BY_POINT,
|
creationMethod = CreationMethod.POINT_BY_POINT,
|
||||||
instanceNamePrefix = "D",
|
instanceNamePrefix = "D",
|
||||||
description = "PhotoDiode schematic symbol",
|
description = "Photo Diode schematic symbol",
|
||||||
zOrder = IDIYComponent.COMPONENT,
|
zOrder = IDIYComponent.COMPONENT,
|
||||||
keywordPolicy = KeywordPolicy.SHOW_TAG,
|
keywordPolicy = KeywordPolicy.SHOW_TAG,
|
||||||
keywordTag = "Schematic",
|
keywordTag = "Schematic",
|
||||||
@@ -69,7 +69,7 @@ public class PhotoDiodeSymbol extends DiodeSymbol {
|
|||||||
//upper arrow
|
//upper arrow
|
||||||
x2 = (int) (3 * d / 2 + Math.cos(Math.PI / 4) * arrowLength);
|
x2 = (int) (3 * d / 2 + Math.cos(Math.PI / 4) * arrowLength);
|
||||||
y2 = (int) (width + Math.sin(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.drawLine(3 * d / 2, (int) width, x2, y2);
|
||||||
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));
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user