mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 09:42:08 +10:00
improve precision of copper traces
This commit is contained in:
@@ -117,7 +117,7 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
// g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
|
||||
// 0.5f));
|
||||
// }
|
||||
int leadThickness = getClosestOdd(getLeadThickness());
|
||||
float leadThickness = getLeadThickness();
|
||||
double leadLength = (distance - calculatePinSpacing(shapeRect)) / 2 - leadThickness / 2;
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(leadThickness));
|
||||
Color leadColor =
|
||||
@@ -335,8 +335,8 @@ public abstract class AbstractLeadedComponent<T> extends AbstractTransparentComp
|
||||
/**
|
||||
* @return default lead thickness. Override this method to change it.
|
||||
*/
|
||||
protected int getLeadThickness() {
|
||||
return (int) LEAD_THICKNESS.convertToPixels();
|
||||
protected float getLeadThickness() {
|
||||
return getClosestOdd(LEAD_THICKNESS.convertToPixels());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class AbstractSchematicLeadedSymbol<T> extends AbstractLeadedCom
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLeadThickness() {
|
||||
protected float getLeadThickness() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -84,8 +84,8 @@ public class CopperTrace extends AbstractLeadedComponent<Void> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLeadThickness() {
|
||||
return (int) getThickness().convertToPixels();
|
||||
protected float getLeadThickness() {
|
||||
return (float) getThickness().convertToPixels();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,7 +38,7 @@ public class CurvedTrace extends AbstractCurvedComponent<Void> {
|
||||
|
||||
@Override
|
||||
protected void drawCurve(CubicCurve2D curve, Graphics2D g2d, ComponentState componentState) {
|
||||
int thickness = (int) size.convertToPixels();
|
||||
float thickness = (float) size.convertToPixels();
|
||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(thickness));
|
||||
Color curveColor =
|
||||
componentState == ComponentState.SELECTED || componentState == ComponentState.DRAGGING ? SELECTION_COLOR
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1708,7 +1708,7 @@
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Solder Pad size shouldn't be rounded up or down to the nearest integer to allow better precision</description>
|
||||
<description>Solder Pad and Copper Trace size shouldn't be rounded up or down to the nearest integer to allow better precision</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
|
||||
Reference in New Issue
Block a user