From 122fa10b8cf22813bb1e88ff69943bc5bb771265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 5 Aug 2021 16:31:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-54885=20=E4=BC=98=E5=8C=96=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BB=B6=E9=95=BF=E7=BA=BF=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/FormHorizontalParallelLine.java | 16 ++++++++-------- .../design/mainframe/FormSpacingLineDrawer.java | 8 ++++---- .../mainframe/FormVerticalParallelLine.java | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormHorizontalParallelLine.java b/designer-form/src/main/java/com/fr/design/mainframe/FormHorizontalParallelLine.java index da2671d32..f9acfcc7b 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormHorizontalParallelLine.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormHorizontalParallelLine.java @@ -24,10 +24,10 @@ public class FormHorizontalParallelLine extends AbstractFormParallelLine { @Override public Point getExtendedLineStartPoint(AbstractFormParallelLine parallelLine) { Point point = new Point(); - if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getStartPosition(), parallelLine.getParallelValue()); - } else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getEndPosition(), parallelLine.getParallelValue()); + if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { + point.setLocation(getStartPosition(), getParallelValue()); + } else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { + point.setLocation(getEndPosition(), getParallelValue()); } return point; } @@ -35,10 +35,10 @@ public class FormHorizontalParallelLine extends AbstractFormParallelLine { @Override public Point getExtendedLineEndPoint(AbstractFormParallelLine parallelLine) { Point point = new Point(); - if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { - point.setLocation(getStartPosition(), parallelLine.getParallelValue()); - } else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { - point.setLocation(getEndPosition(), parallelLine.getParallelValue()); + if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { + point.setLocation(parallelLine.getStartPosition(), getParallelValue()); + } else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { + point.setLocation(parallelLine.getEndPosition(), getParallelValue()); } return point; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java index 0b92efc16..a46a59af4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java @@ -91,10 +91,10 @@ public class FormSpacingLineDrawer { private void drawExtendedLine(Graphics g, AbstractFormParallelLine[] nearestSides) { if (isNeedExtendedLine(nearestSides)) { - int startX = (int) nearestSides[0].getExtendedLineStartPoint(nearestSides[1]).getX(); - int startY = (int) nearestSides[0].getExtendedLineStartPoint(nearestSides[1]).getY(); - int endX = (int) nearestSides[0].getExtendedLineEndPoint(nearestSides[1]).getX(); - int endY = (int) nearestSides[0].getExtendedLineEndPoint(nearestSides[1]).getY(); + 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(); drawExtendedLine(g, startX, startY, endX, endY); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormVerticalParallelLine.java b/designer-form/src/main/java/com/fr/design/mainframe/FormVerticalParallelLine.java index e99cdd207..19028bc25 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormVerticalParallelLine.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormVerticalParallelLine.java @@ -24,10 +24,10 @@ public class FormVerticalParallelLine extends AbstractFormParallelLine { @Override public Point getExtendedLineStartPoint(AbstractFormParallelLine parallelLine) { Point point = new Point(); - if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getParallelValue(), parallelLine.getStartPosition()); - } else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getParallelValue(), parallelLine.getEndPosition()); + if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { + point.setLocation(getParallelValue(), getStartPosition()); + } else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { + point.setLocation(getParallelValue(), getEndPosition()); } return point; } @@ -35,10 +35,10 @@ public class FormVerticalParallelLine extends AbstractFormParallelLine { @Override public Point getExtendedLineEndPoint(AbstractFormParallelLine parallelLine) { Point point = new Point(); - if (isVerticalCenterLineBeforeTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getParallelValue(), getStartPosition()); - } else if (isVerticalCenterLineBehindTheParallelLine(parallelLine)) { - point.setLocation(parallelLine.getParallelValue(), getEndPosition()); + if (parallelLine.isVerticalCenterLineBeforeTheParallelLine(this)) { + point.setLocation(getParallelValue(), parallelLine.getStartPosition()); + } else if (parallelLine.isVerticalCenterLineBehindTheParallelLine(this)) { + point.setLocation(getParallelValue(), parallelLine.getEndPosition()); } return point; }