X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjssun%2Fjava2d%2FSunCompositeContext.js;fp=site%2Fj2s%2Fjssun%2Fjava2d%2FSunCompositeContext.js;h=b6fc19ee210b87d119fb0e4d2d94953c2de39a5f;hp=99a5611c146aa48c2de48c2e0830b7a78cad2423;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jssun/java2d/SunCompositeContext.js b/site/j2s/jssun/java2d/SunCompositeContext.js index 99a5611..b6fc19e 100644 --- a/site/j2s/jssun/java2d/SunCompositeContext.js +++ b/site/j2s/jssun/java2d/SunCompositeContext.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("jssun.java2d"); -Clazz.load (["java.awt.CompositeContext"], "jssun.java2d.SunCompositeContext", ["java.lang.NullPointerException", "java.awt.image.BufferedImage", "$.WritableRaster", "jssun.java2d.loops.CompositeType"], function () { -c$ = Clazz.decorateAsClass (function () { -this.srcCM = null; -this.dstCM = null; -this.composite = null; -this.comptype = null; -Clazz.instantialize (this, arguments); -}, jssun.java2d, "SunCompositeContext", null, java.awt.CompositeContext); -Clazz.makeConstructor (c$, -function (ac, s, d) { -if (s == null) { -throw new NullPointerException ("Source color model cannot be null"); -}if (d == null) { -throw new NullPointerException ("Destination color model cannot be null"); -}this.srcCM = s; -this.dstCM = d; -this.composite = ac; -this.comptype = jssun.java2d.loops.CompositeType.forAlphaComposite (ac); -}, "java.awt.AlphaComposite,java.awt.image.ColorModel,java.awt.image.ColorModel"); -Clazz.overrideMethod (c$, "dispose", -function () { -}); -Clazz.overrideMethod (c$, "compose", -function (srcArg, dstIn, dstOut) { -var src; -var w; -var h; -if (dstIn !== dstOut) { -dstOut.setDataElementsRaster (0, 0, dstIn); -}if (Clazz.instanceOf (srcArg, java.awt.image.WritableRaster)) { -src = srcArg; -} else { -src = srcArg.createCompatibleWritableRaster (); -src.setDataElements (0, 0, srcArg); -}w = Math.min (src.getWidth (), dstIn.getWidth ()); -h = Math.min (src.getHeight (), dstIn.getHeight ()); -var srcImg = new java.awt.image.BufferedImage (this.srcCM, src, this.srcCM.isAlphaPremultiplied (), null); -var dstImg = new java.awt.image.BufferedImage (this.dstCM, dstOut, this.dstCM.isAlphaPremultiplied (), null); -}, "java.awt.image.Raster,java.awt.image.Raster,java.awt.image.WritableRaster"); -}); +Clazz.declarePackage ("jssun.java2d"); +Clazz.load (["java.awt.CompositeContext"], "jssun.java2d.SunCompositeContext", ["java.lang.NullPointerException", "java.awt.image.BufferedImage", "$.WritableRaster", "jssun.java2d.loops.CompositeType"], function () { +c$ = Clazz.decorateAsClass (function () { +this.srcCM = null; +this.dstCM = null; +this.composite = null; +this.comptype = null; +Clazz.instantialize (this, arguments); +}, jssun.java2d, "SunCompositeContext", null, java.awt.CompositeContext); +Clazz.makeConstructor (c$, +function (ac, s, d) { +if (s == null) { +throw new NullPointerException ("Source color model cannot be null"); +}if (d == null) { +throw new NullPointerException ("Destination color model cannot be null"); +}this.srcCM = s; +this.dstCM = d; +this.composite = ac; +this.comptype = jssun.java2d.loops.CompositeType.forAlphaComposite (ac); +}, "java.awt.AlphaComposite,java.awt.image.ColorModel,java.awt.image.ColorModel"); +Clazz.overrideMethod (c$, "dispose", +function () { +}); +Clazz.overrideMethod (c$, "compose", +function (srcArg, dstIn, dstOut) { +var src; +var w; +var h; +if (dstIn !== dstOut) { +dstOut.setDataElementsRaster (0, 0, dstIn); +}if (Clazz.instanceOf (srcArg, java.awt.image.WritableRaster)) { +src = srcArg; +} else { +src = srcArg.createCompatibleWritableRaster (); +src.setDataElements (0, 0, srcArg); +}w = Math.min (src.getWidth (), dstIn.getWidth ()); +h = Math.min (src.getHeight (), dstIn.getHeight ()); +var srcImg = new java.awt.image.BufferedImage (this.srcCM, src, this.srcCM.isAlphaPremultiplied (), null); +var dstImg = new java.awt.image.BufferedImage (this.dstCM, dstOut, this.dstCM.isAlphaPremultiplied (), null); +}, "java.awt.image.Raster,java.awt.image.Raster,java.awt.image.WritableRaster"); +});