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