< prev index next >

src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.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
*** 257,267 **** if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short outData[]; if (obj == null) { outData = new short[numDataElements]; } else { outData = (short[])obj; } --- 257,267 ---- if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short[] outData; if (obj == null) { outData = new short[numDataElements]; } else { outData = (short[])obj; }
*** 305,315 **** if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short outData[]; if (obj == null) { outData = new short[w*h*numDataElements]; } else { outData = (short[])obj; } --- 305,315 ---- if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short[] outData; if (obj == null) { outData = new short[w*h*numDataElements]; } else { outData = (short[])obj; }
*** 458,468 **** if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short inData[] = (short[])obj; int off = (y-minY)*scanlineStride + (x-minX)*pixelStride; for (int i = 0; i < numDataElements; i++) { data[dataOffsets[i] + off] = inData[i]; } --- 458,468 ---- if ((x < this.minX) || (y < this.minY) || (x >= this.maxX) || (y >= this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short[] inData = (short[])obj; int off = (y-minY)*scanlineStride + (x-minX)*pixelStride; for (int i = 0; i < numDataElements; i++) { data[dataOffsets[i] + off] = inData[i]; }
*** 556,566 **** if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short inData[] = (short[])obj; int yoff = (y-minY)*scanlineStride + (x-minX)*pixelStride; int xoff; int off = 0; int xstart; --- 556,566 ---- if ((x < this.minX) || (y < this.minY) || (x + w > this.maxX) || (y + h > this.maxY)) { throw new ArrayIndexOutOfBoundsException ("Coordinate out of bounds!"); } ! short[] inData = (short[])obj; int yoff = (y-minY)*scanlineStride + (x-minX)*pixelStride; int xoff; int off = 0; int xstart;
< prev index next >