< prev index next >
src/java.desktop/share/classes/sun/awt/IconInfo.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2006, 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) 2006, 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
*** 117,127 ****
/*
* returns scaled raw length.
*/
private int getScaledRawLength(int w, int h) {
! int scaledWidthAndHeight[] = getScaledWidthAndHeight(w, h);
return scaledWidthAndHeight[0] * scaledWidthAndHeight[1] + 2;
}
/*
* returns the scaled width and height.
--- 117,127 ----
/*
* returns scaled raw length.
*/
private int getScaledRawLength(int w, int h) {
! int[] scaledWidthAndHeight = getScaledWidthAndHeight(w, h);
return scaledWidthAndHeight[0] * scaledWidthAndHeight[1] + 2;
}
/*
* returns the scaled width and height.
*** 235,245 ****
}
ColorModel cm =
new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000,
false, DataBuffer.TYPE_INT);
! int scaledWidthAndHeight[] = getScaledWidthAndHeight(width, height);
width = scaledWidthAndHeight[0];
height = scaledWidthAndHeight[1];
DataBufferInt buffer = new DataBufferInt(width * height);
WritableRaster raster =
Raster.createPackedRaster(buffer, width, height,
--- 235,245 ----
}
ColorModel cm =
new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000,
false, DataBuffer.TYPE_INT);
! int[] scaledWidthAndHeight = getScaledWidthAndHeight(width, height);
width = scaledWidthAndHeight[0];
height = scaledWidthAndHeight[1];
DataBufferInt buffer = new DataBufferInt(width * height);
WritableRaster raster =
Raster.createPackedRaster(buffer, width, height,
< prev index next >