1 Clazz.declarePackage ("jssun.java2d");
\r
2 Clazz.load (["java.awt.CompositeContext"], "jssun.java2d.SunCompositeContext", ["java.lang.NullPointerException", "java.awt.image.BufferedImage", "$.WritableRaster", "jssun.java2d.loops.CompositeType"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
6 this.composite = null;
\r
7 this.comptype = null;
\r
8 Clazz.instantialize (this, arguments);
\r
9 }, jssun.java2d, "SunCompositeContext", null, java.awt.CompositeContext);
\r
10 Clazz.makeConstructor (c$,
\r
11 function (ac, s, d) {
\r
13 throw new NullPointerException ("Source color model cannot be null");
\r
15 throw new NullPointerException ("Destination color model cannot be null");
\r
18 this.composite = ac;
\r
19 this.comptype = jssun.java2d.loops.CompositeType.forAlphaComposite (ac);
\r
20 }, "java.awt.AlphaComposite,java.awt.image.ColorModel,java.awt.image.ColorModel");
\r
21 Clazz.overrideMethod (c$, "dispose",
\r
24 Clazz.overrideMethod (c$, "compose",
\r
25 function (srcArg, dstIn, dstOut) {
\r
29 if (dstIn !== dstOut) {
\r
30 dstOut.setDataElementsRaster (0, 0, dstIn);
\r
31 }if (Clazz.instanceOf (srcArg, java.awt.image.WritableRaster)) {
\r
34 src = srcArg.createCompatibleWritableRaster ();
\r
35 src.setDataElements (0, 0, srcArg);
\r
36 }w = Math.min (src.getWidth (), dstIn.getWidth ());
\r
37 h = Math.min (src.getHeight (), dstIn.getHeight ());
\r
38 var srcImg = new java.awt.image.BufferedImage (this.srcCM, src, this.srcCM.isAlphaPremultiplied (), null);
\r
39 var dstImg = new java.awt.image.BufferedImage (this.dstCM, dstOut, this.dstCM.isAlphaPremultiplied (), null);
\r
40 }, "java.awt.image.Raster,java.awt.image.Raster,java.awt.image.WritableRaster");
\r