File: fix_swtgraphics

package info (click to toggle)
piccolo 1.2-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, trixie
  • size: 1,668 kB
  • sloc: java: 16,496; xml: 259; sh: 18; makefile: 13
file content (47 lines) | stat: -rw-r--r-- 1,598 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: Fix SWTGraphics
Origin: Piccolo2D
Last-Update: 2012-05-31 02:05:56 +0200

Fix compilation problems and warnings in class based on latest piccolo version

--- a/extras/edu/umd/cs/piccolox/swt/SWTGraphics2D.java	2005-12-06 11:47:50.000000000 +0100
+++ b/extras/edu/umd/cs/piccolox/swt/SWTGraphics2D.java 2012-05-31 02:28:45.457346847 +0200
@@ -20,6 +20,8 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Arc2D;
 import java.awt.geom.Ellipse2D;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.PathIterator;
 import java.awt.geom.Rectangle2D;
 import java.awt.geom.RoundRectangle2D;
 import java.awt.image.BufferedImage;
@@ -36,6 +38,9 @@
 import org.eclipse.swt.graphics.Device;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Path;
+import org.eclipse.swt.graphics.Transform;
+
 
 /**
  * An extension to Graphics2D to support an SWT Piccolo Canvas with little modification to the current Piccolo architecture
@@ -238,7 +243,7 @@
 					style = style | SWT.ITALIC;	
 				}
 				
-				return new Font(fd[0].getName(),style,fd[0].height);
+				return new Font(fd[0].getName(),style,fd[0].getHeight());
 			}
 			return null;			
 		}
@@ -675,10 +680,6 @@
 		gc.fillGradientRectangle(SWT_RECT.x,SWT_RECT.y,SWT_RECT.width,SWT_RECT.height,vertical);
 	}
 
-	public void setXORMode(boolean xOr) {
-		gc.setXORMode(xOr);	
-	}
-
 	public int getAdvanceWidth(char ch) {
 		org.eclipse.swt.graphics.Font scaledFont = gc.getFont();
 		gc.setFont(curFont);