Bug 253673 Snippet207 doesn't rotate 45
The snippet says it is rotating 45 but this is not the case because Math.cos() and Math.sin() use radians and not degrees. The snippet has to look like this to really rotate 45 one needs to pass "45 * Math.PI / 180" to the 2 functions.
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet207.java
final Image image = new Image(display, 110, 60);
		GC gc = new GC(image);
		Font font = new Font(display, "Times", 30, SWT.BOLD);
		gc.setFont(font);
		gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
		gc.fillRectangle(0, 0, 110, 60);
		gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
		gc.drawText("SWT", 10, 10, true);
		font.dispose();
		gc.dispose();
		
		final Rectangle rect = image.getBounds();
		Shell shell = new Shell(display);
		shell.setText("Matrix Tranformations");
		shell.setLayout(new FillLayout());
		final Canvas canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
		canvas.addPaintListener(new PaintListener () {
			public void paintControl(PaintEvent e) {	
				GC gc = e.gc;
				gc.setAdvanced(true);
				if (!gc.getAdvanced()){
					gc.drawText("Advanced graphics not supported", 30, 30, true);
					return;
				}
				
				
				int x = 30, y = 30;
				gc.drawImage(image, x, y); 
				x += rect.width + 30;