Skip to content

Commit e3152dc

Browse files
committed
reduced DrawableScreenshot offset line drawing protocol to just horizontal and vertical lines.
1 parent 569b293 commit e3152dc

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

src/main/java/net/itarray/automotion/internal/DrawableScreenshot.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.itarray.automotion.internal;
22

3+
import net.itarray.automotion.internal.geometry.Scalar;
34
import net.itarray.automotion.internal.geometry.Vector;
45
import net.itarray.automotion.tools.helpers.Helper;
56

@@ -53,24 +54,14 @@ public File getDrawingsOutput() {
5354
return drawingsOutput;
5455
}
5556

56-
public void drawLeftOffsetLine(UIElement rootElement) {
57+
public void drawVerticalLine(Scalar x) {
5758
drawingConfiguration.setLinesStyle(graphics);
58-
graphics.drawVerticalLine(rootElement.getX().intValue(), extend.getY().intValue());
59+
graphics.drawVerticalLine(x.intValue(), extend.getY().intValue());
5960
}
6061

61-
public void drawRightOffsetLine(UIElement rootElement) {
62+
public void drawHorizontalLine(Scalar y) {
6263
drawingConfiguration.setLinesStyle(graphics);
63-
graphics.drawVerticalLine(rootElement.getCorner().getX().intValue(), extend.getY().intValue());
64-
}
65-
66-
public void drawTopOffsetLine(UIElement rootElement) {
67-
drawingConfiguration.setLinesStyle(graphics);
68-
graphics.drawHorizontalLine(rootElement.getY().intValue(), extend.getX().intValue());
69-
}
70-
71-
public void drawBottomOffsetLine(UIElement rootElement) {
72-
drawingConfiguration.setLinesStyle(graphics);
73-
graphics.drawHorizontalLine(rootElement.getCorner().getY().intValue(), extend.getX().intValue());
64+
graphics.drawHorizontalLine(y.intValue(), extend.getX().intValue());
7465
}
7566

7667
public void drawRectangle(int x, int y, int width, int height) {

src/main/java/net/itarray/automotion/internal/UIValidatorBase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,25 +614,25 @@ protected void drawRootElement() {
614614

615615
private void drawLeftOffsetLine() {
616616
if (isWithReport()) {
617-
drawableScreenshot.drawLeftOffsetLine(rootElement);
617+
drawableScreenshot.drawVerticalLine(rootElement.getX());
618618
}
619619
}
620620

621621
private void drawRightOffsetLine() {
622622
if (isWithReport()) {
623-
drawableScreenshot.drawRightOffsetLine(rootElement);
623+
drawableScreenshot.drawVerticalLine(rootElement.getCorner().getX());
624624
}
625625
}
626626

627627
private void drawTopOffsetLine() {
628628
if (isWithReport()) {
629-
drawableScreenshot.drawTopOffsetLine(rootElement);
629+
drawableScreenshot.drawHorizontalLine(rootElement.getY());
630630
}
631631
}
632632

633633
private void drawBottomOffsetLine() {
634634
if (isWithReport()) {
635-
drawableScreenshot.drawBottomOffsetLine(rootElement);
635+
drawableScreenshot.drawHorizontalLine(rootElement.getCorner().getY());
636636
}
637637
}
638638

0 commit comments

Comments
 (0)