Browse Source

Pull request #5402: REPORT-56895 还是计算间距线相对位置的问题

Merge in DESIGN/design from ~FANGLEI/design10.0:feature/10.0 to feature/10.0

* commit '69bfee3359ca16974c8c82b9a2b68cd881ad4abe':
  REPORT-56895 还是计算间距线相对位置的问题
feature/10.0
fanglei 3 years ago
parent
commit
946db2fdd3
  1. 16
      designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java

16
designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java

@ -80,10 +80,10 @@ public class FormSpacingLineDrawer {
return;
}
int startX = (int) nearestSides[0].getStartPointOnVerticalCenterLine().getX();
int startY = (int) nearestSides[0].getStartPointOnVerticalCenterLine().getY();
int endX = (int) nearestSides[0].getEndPointOnVerticalCenterLine(nearestSides[1].getParallelValue()).getX();
int endY = (int) nearestSides[0].getEndPointOnVerticalCenterLine(nearestSides[1].getParallelValue()).getY();
int startX = (int) nearestSides[0].getStartPointOnVerticalCenterLine().getX() - designer.getHorizontalScaleValue();
int startY = (int) nearestSides[0].getStartPointOnVerticalCenterLine().getY() - designer.getVerticalScaleValue();
int endX = (int) nearestSides[0].getEndPointOnVerticalCenterLine(nearestSides[1].getParallelValue()).getX() - designer.getHorizontalScaleValue();
int endY = (int) nearestSides[0].getEndPointOnVerticalCenterLine(nearestSides[1].getParallelValue()).getY() - designer.getVerticalScaleValue();
drawSpacingLine(g, startX, startY, endX, endY);
drawSpacingText(g, String.valueOf(gap), (startX + endX) / 2, (startY + endY) / 2);
@ -98,10 +98,10 @@ public class FormSpacingLineDrawer {
private void drawExtendedLine(Graphics g, AbstractFormParallelLine[] nearestSides) {
if (isNeedExtendedLine(nearestSides)) {
int startX = (int) nearestSides[1].getExtendedLineStartPoint(nearestSides[0]).getX();
int startY = (int) nearestSides[1].getExtendedLineStartPoint(nearestSides[0]).getY();
int endX = (int) nearestSides[1].getExtendedLineEndPoint(nearestSides[0]).getX();
int endY = (int) nearestSides[1].getExtendedLineEndPoint(nearestSides[0]).getY();
int startX = (int) nearestSides[1].getExtendedLineStartPoint(nearestSides[0]).getX() - designer.getHorizontalScaleValue();
int startY = (int) nearestSides[1].getExtendedLineStartPoint(nearestSides[0]).getY() - designer.getVerticalScaleValue();
int endX = (int) nearestSides[1].getExtendedLineEndPoint(nearestSides[0]).getX() - designer.getHorizontalScaleValue();
int endY = (int) nearestSides[1].getExtendedLineEndPoint(nearestSides[0]).getY() - designer.getVerticalScaleValue();
drawExtendedLine(g, startX, startY, endX, endY);
}
}

Loading…
Cancel
Save