Reputation: 8738
If I am drawing a line using:
GC.drawLine(int x1, int y1, int x2, int y2);
How do I change the colour of the line?
I can change the transparency by calling:
gc.setAlpha(150);
But I cannot find method of changing the colour of the line
Upvotes: 0
Views: 500
Reputation: 596
Draw functions draw with the foreground color:
gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
Upvotes: 3