< prev index next >
src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2017, 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) 2000, 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
*** 50,63 ****
*/
public final class DataBufferFloat extends DataBuffer {
/** The array of data banks. */
! float bankdata[][];
/** A reference to the default data bank. */
! float data[];
/**
* Constructs a {@code float}-based {@code DataBuffer}
* with a specified size.
*
--- 50,63 ----
*/
public final class DataBufferFloat extends DataBuffer {
/** The array of data banks. */
! float[][] bankdata;
/** A reference to the default data bank. */
! float[] data;
/**
* Constructs a {@code float}-based {@code DataBuffer}
* with a specified size.
*
*** 103,113 ****
*
* @param dataArray An array of {@code float}s to be used as the
* first and only bank of this {@code DataBuffer}.
* @param size The number of elements of the array to be used.
*/
! public DataBufferFloat(float dataArray[], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size);
data = dataArray;
bankdata = new float[1][];
bankdata[0] = data;
}
--- 103,113 ----
*
* @param dataArray An array of {@code float}s to be used as the
* first and only bank of this {@code DataBuffer}.
* @param size The number of elements of the array to be used.
*/
! public DataBufferFloat(float[] dataArray, int size) {
super(UNTRACKABLE, TYPE_FLOAT, size);
data = dataArray;
bankdata = new float[1][];
bankdata[0] = data;
}
*** 129,139 ****
* first and only bank of this {@code DataBuffer}.
* @param size The number of elements of the array to be used.
* @param offset The offset of the first element of the array
* that will be used.
*/
! public DataBufferFloat(float dataArray[], int size, int offset) {
super(UNTRACKABLE, TYPE_FLOAT, size, 1, offset);
data = dataArray;
bankdata = new float[1][];
bankdata[0] = data;
}
--- 129,139 ----
* first and only bank of this {@code DataBuffer}.
* @param size The number of elements of the array to be used.
* @param offset The offset of the first element of the array
* that will be used.
*/
! public DataBufferFloat(float[] dataArray, int size, int offset) {
super(UNTRACKABLE, TYPE_FLOAT, size, 1, offset);
data = dataArray;
bankdata = new float[1][];
bankdata[0] = data;
}
*** 152,162 ****
*
* @param dataArray An array of arrays of {@code float}s to be
* used as the banks of this {@code DataBuffer}.
* @param size The number of elements of each array to be used.
*/
! public DataBufferFloat(float dataArray[][], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
bankdata = dataArray.clone();
data = bankdata[0];
}
--- 152,162 ----
*
* @param dataArray An array of arrays of {@code float}s to be
* used as the banks of this {@code DataBuffer}.
* @param size The number of elements of each array to be used.
*/
! public DataBufferFloat(float[][] dataArray, int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
bankdata = dataArray.clone();
data = bankdata[0];
}
*** 176,186 ****
* @param dataArray An array of arrays of {@code float}s to be
* used as the banks of this {@code DataBuffer}.
* @param size The number of elements of each array to be used.
* @param offsets An array of integer offsets, one for each bank.
*/
! public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
bankdata = dataArray.clone();
data = bankdata[0];
}
--- 176,186 ----
* @param dataArray An array of arrays of {@code float}s to be
* used as the banks of this {@code DataBuffer}.
* @param size The number of elements of each array to be used.
* @param offsets An array of integer offsets, one for each bank.
*/
! public DataBufferFloat(float[][] dataArray, int size, int[] offsets) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
bankdata = dataArray.clone();
data = bankdata[0];
}
< prev index next >