03bbdfdbc24bdaa7ddd1151ab4244e188f229852
[jalviewjs.git] / site / j2s / jssun / java2d / SunGraphics2D.js
1 Clazz.declarePackage ("jssun.java2d");\r
2 Clazz.load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.transformState = 0;\r
5 this.foregroundColor = null;\r
6 this.backgroundColor = null;\r
7 this.$transform = null;\r
8 this.transX = 0;\r
9 this.transY = 0;\r
10 this.hints = null;\r
11 Clazz.instantialize (this, arguments);\r
12 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);\r
13 Clazz.defineMethod (c$, "clone", \r
14 function () {\r
15 return this.clone0 ();\r
16 });\r
17 Clazz.defineMethod (c$, "clone0", \r
18 function () {\r
19 try {\r
20 var g;\r
21 {\r
22 g = Clazz.clone(this);\r
23 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);\r
24 if (this.hints != null) {\r
25 g.hints = this.hints.clone ();\r
26 }return g;\r
27 } catch (e) {\r
28 if (Clazz.exceptionOf (e, CloneNotSupportedException)) {\r
29 } else {\r
30 throw e;\r
31 }\r
32 }\r
33 return null;\r
34 });\r
35 Clazz.defineMethod (c$, "create", \r
36 function () {\r
37 return this.clone0 ();\r
38 });\r
39 Clazz.defineStatics (c$,\r
40 "TRANSFORM_GENERIC", 4,\r
41 "TRANSFORM_TRANSLATESCALE", 3,\r
42 "TRANSFORM_ANY_TRANSLATE", 2,\r
43 "TRANSFORM_INT_TRANSLATE", 1,\r
44 "TRANSFORM_ISIDENT", 0);\r
45 });\r