@@ -40,6 +40,8 @@ public class LinesSocketPreviewView extends SocketPreviewView<LinesReport> {
4040 private final ImageView imageView = new ImageView ();
4141 private final Label infoLabel = new Label ();
4242 private final Mat tmp = new Mat ();
43+ private final Point startPoint = new Point ();
44+ private final Point endPoint = new Point ();
4345 private final GripPlatform platform ;
4446 @ SuppressWarnings ("PMD.ImmutableField" )
4547 @ SuppressFBWarnings (value = "IS2_INCONSISTENT_SYNC" ,
@@ -99,8 +101,10 @@ private void convertImage() {
99101
100102 // For each line in the report, draw a line along with the starting and ending points
101103 for (LinesReport .Line line : lines ) {
102- final Point startPoint = new Point ((int ) line .x1 , (int ) line .y1 );
103- final Point endPoint = new Point ((int ) line .x2 , (int ) line .y2 );
104+ startPoint .x ((int ) line .x1 );
105+ startPoint .y ((int ) line .y1 );
106+ endPoint .x ((int ) line .x2 );
107+ endPoint .y ((int ) line .y2 );
104108 line (input , startPoint , endPoint , Scalar .WHITE , 2 , LINE_8 , 0 );
105109 circle (input , startPoint , 2 , Scalar .WHITE , 2 , LINE_8 , 0 );
106110 circle (input , endPoint , 2 , Scalar .WHITE , 2 , LINE_8 , 0 );
0 commit comments