@@ -597,8 +597,6 @@ public void handleEvent(Event e) {
597
597
598
598
gcImage = new GC ( bufferImage );
599
599
600
- gcImage .drawImage (bufferScale , 0 , 0 );
601
-
602
600
gcImage .setAntialias ( SWT .ON );
603
601
gcImage .setTextAntialias ( SWT .ON );
604
602
@@ -614,6 +612,8 @@ public void handleEvent(Event e) {
614
612
}
615
613
}
616
614
615
+ List <Object []> time_strs = new ArrayList <>();
616
+
617
617
int [] oldTargetValues = new int [all_values .length ];
618
618
619
619
int [] maxs = new int [all_values .length ];
@@ -663,10 +663,8 @@ public void handleEvent(Event e) {
663
663
if ( xPos >= 0 ){
664
664
665
665
if ( last_xpos < 0 || xPos + p .x < last_xpos ){
666
-
667
- gcImage .setForeground ( colorGrey );
668
-
669
- gcImage .drawText ( str , xPos , 0 , true );
666
+
667
+ time_strs .add ( new Object []{ str , xPos });
670
668
671
669
last_xpos = xPos ;
672
670
}
@@ -689,10 +687,8 @@ public void handleEvent(Event e) {
689
687
int xPos = xDraw -p .x /2 ;
690
688
691
689
if ( xPos >= 0 ){
692
-
693
- gcImage .setForeground ( colorGrey );
694
-
695
- gcImage .drawText ( str , xPos , 0 , true );
690
+
691
+ time_strs .add ( new Object []{ str , xPos });
696
692
}
697
693
}
698
694
}
@@ -808,6 +804,21 @@ public void handleEvent(Event e) {
808
804
return ;
809
805
}
810
806
807
+ gcImage .drawImage (bufferScale ,0 ,0 );
808
+
809
+ if ( !time_strs .isEmpty ()){
810
+
811
+ gcImage .setForeground ( colorGrey );
812
+
813
+ for ( Object [] entry : time_strs ){
814
+
815
+ String str = (String )entry [0 ];
816
+ int xPos = (Integer )entry [1 ];
817
+
818
+ gcImage .drawText ( str , xPos , 0 , true );
819
+ }
820
+ }
821
+
811
822
int [] prev_x = new int [value_sources .length ];
812
823
int [] prev_y = new int [value_sources .length ];
813
824
0 commit comments