Skip to content

Commit e65c9fa

Browse files
committed
Add antialiasing for timeline painting
Change-Id: I368822393757c33ecb1d663452b4a53a3714db55
1 parent 8c600c0 commit e65c9fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/projections/Tools/Timeline/MainPanel.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.awt.Graphics2D;
1010
import java.awt.Point;
1111
import java.awt.Rectangle;
12+
import java.awt.RenderingHints;
1213
import java.awt.event.MouseEvent;
1314
import java.awt.event.MouseListener;
1415
import java.awt.event.MouseMotionListener;
@@ -115,10 +116,12 @@ public void run() {
115116
/** Paint the entire opaque panel*/
116117
public void paintComponent(Graphics g) {
117118
synchronized(data){
119+
Graphics2D g2 = (Graphics2D)g;
120+
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
118121
if(RenderInParallel && data.numPs()>1){
119-
paintInParallel((Graphics2D)g);
122+
paintInParallel(g2);
120123
} else {
121-
paintSequentially((Graphics2D)g);
124+
paintSequentially(g2);
122125
}
123126
}
124127
}

0 commit comments

Comments
 (0)