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