< prev index next >

src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 259,269 **** if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte outData[]; if (obj == null) { outData = new byte[numDataElements]; } else { outData = (byte[])obj; } --- 259,269 ---- if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte[] outData; if (obj == null) { outData = new byte[numDataElements]; } else { outData = (byte[])obj; }
*** 307,317 **** if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte outData[]; if (obj == null) { outData = new byte[w*h*numDataElements]; } else { outData = (byte[])obj; } --- 307,317 ---- if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte[] outData; if (obj == null) { outData = new byte[w*h*numDataElements]; } else { outData = (byte[])obj; }
*** 461,471 **** if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte inData[] = (byte[])obj; int off = (y-minY)*scanlineStride + (x-minX)*pixelStride; for (int i = 0; i < numDataElements; i++) { data[dataOffsets[i] + off] = inData[i]; --- 461,471 ---- if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte[] inData = (byte[])obj; int off = (y-minY)*scanlineStride + (x-minX)*pixelStride; for (int i = 0; i < numDataElements; i++) { data[dataOffsets[i] + off] = inData[i];
*** 581,591 **** if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte inData[] = (byte[])obj; int yoff = (y-minY)*scanlineStride + (x-minX)*pixelStride; int xoff; int off = 0; int xstart; --- 581,591 ---- if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! byte[] inData = (byte[])obj; int yoff = (y-minY)*scanlineStride + (x-minX)*pixelStride; int xoff; int off = 0; int xstart;
< prev index next >