@@ -40,6 +40,8 @@ public class LinesSocketPreviewView extends SocketPreviewView<LinesReport> {
40
40
private final ImageView imageView = new ImageView ();
41
41
private final Label infoLabel = new Label ();
42
42
private final Mat tmp = new Mat ();
43
+ private final Point startPoint = new Point ();
44
+ private final Point endPoint = new Point ();
43
45
private final GripPlatform platform ;
44
46
@ SuppressWarnings ("PMD.ImmutableField" )
45
47
@ SuppressFBWarnings (value = "IS2_INCONSISTENT_SYNC" ,
@@ -99,8 +101,10 @@ private void convertImage() {
99
101
100
102
// For each line in the report, draw a line along with the starting and ending points
101
103
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 );
104
108
line (input , startPoint , endPoint , Scalar .WHITE , 2 , LINE_8 , 0 );
105
109
circle (input , startPoint , 2 , Scalar .WHITE , 2 , LINE_8 , 0 );
106
110
circle (input , endPoint , 2 , Scalar .WHITE , 2 , LINE_8 , 0 );
0 commit comments