Skip to content

Commit e8ee8f0

Browse files
committed
pushed drawing protocol (horizontal and vertical lines) up to ResponsiveUIValidatorBase.
1 parent e3152dc commit e8ee8f0

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

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

Lines changed: 12 additions & 0 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
import net.itarray.automotion.validation.ResponsiveUIValidator;
@@ -230,4 +231,15 @@ public DrawingConfiguration getDrawingConfiguration() {
230231
return getReport().getDrawingConfiguration();
231232
}
232233

234+
protected void drawVerticalLine(Scalar x) {
235+
if (isWithReport()) {
236+
drawableScreenshot.drawVerticalLine(x);
237+
}
238+
}
239+
240+
protected void drawHorizontalLine(Scalar y) {
241+
if (isWithReport()) {
242+
drawableScreenshot.drawHorizontalLine(y);
243+
}
244+
}
233245
}

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

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -613,28 +613,18 @@ protected void drawRootElement() {
613613
}
614614

615615
private void drawLeftOffsetLine() {
616-
if (isWithReport()) {
617-
drawableScreenshot.drawVerticalLine(rootElement.getX());
618-
}
616+
drawVerticalLine(rootElement.getX());
619617
}
620618

621619
private void drawRightOffsetLine() {
622-
if (isWithReport()) {
623-
drawableScreenshot.drawVerticalLine(rootElement.getCorner().getX());
624-
}
620+
drawVerticalLine(rootElement.getCorner().getX());
625621
}
626622

627623
private void drawTopOffsetLine() {
628-
if (isWithReport()) {
629-
drawableScreenshot.drawHorizontalLine(rootElement.getY());
630-
}
624+
drawHorizontalLine(rootElement.getY());
631625
}
632626

633627
private void drawBottomOffsetLine() {
634-
if (isWithReport()) {
635-
drawableScreenshot.drawHorizontalLine(rootElement.getCorner().getY());
636-
}
628+
drawHorizontalLine(rootElement.getCorner().getY());
637629
}
638-
639-
640630
}

0 commit comments

Comments
 (0)