mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
added ic pins
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
<unit class="org.diylc.core.measures.ResistanceUnit">K</unit>
|
||||
</org.diylc.core.measures.Resistance>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lastPath</string>
|
||||
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>metric</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>lastPath</string>
|
||||
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>default.org.diylc.components.passive.AxialFilmCapacitor:Width</string>
|
||||
<org.diylc.core.measures.Size>
|
||||
|
||||
Binary file not shown.
+3
-2
@@ -31,6 +31,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
|
||||
public static Color LEAD_COLOR = Color.black;
|
||||
public static Color LABEL_COLOR = Color.black;
|
||||
public static Color LABEL_COLOR_SELECTED = Color.red;
|
||||
public static Size LEAD_THICKNESS = new Size(0.3d, SizeUnit.mm);
|
||||
|
||||
protected Size width;
|
||||
protected Size height;
|
||||
@@ -83,7 +84,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
|
||||
* @return default lead thickness. Override this method to change it.
|
||||
*/
|
||||
protected Size getLeadThickness() {
|
||||
return new Size(0.5d, SizeUnit.mm);
|
||||
return LEAD_THICKNESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +101,7 @@ public abstract class AbstractLeadedDIYComponent<T> extends AbstractTransparentC
|
||||
|
||||
@Override
|
||||
public Point getControlPoint(int index) {
|
||||
return (Point) points[index].clone();
|
||||
return (Point) points[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ public class Size extends AbstractMeasure<SizeUnit> {
|
||||
|
||||
public int convertToPixels() {
|
||||
double factor = getUnit().getFactor() / SizeUnit.in.getFactor();
|
||||
return (int) (factor * Constants.PIXELS_PER_INCH * getValue());
|
||||
return (int) Math.round(factor * Constants.PIXELS_PER_INCH * getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user