java.awt.image
Class DataBufferFloat
A
DataBuffer
that uses an array of
float
primitives
to represent each of its banks.
TYPE_BYTE , TYPE_DOUBLE , TYPE_FLOAT , TYPE_INT , TYPE_SHORT , TYPE_UNDEFINED , TYPE_USHORT , banks , dataType , offset , offsets , size |
DataBufferFloat(float[] dataArray, int size) - Creates a new data buffer backed by the specified data bank.
|
DataBufferFloat(float[] dataArray, int size, int offset) - Creates a new data buffer backed by the specified data bank, with
the specified offset to the first element.
|
DataBufferFloat(float[][] dataArray, int size) - Creates a new data buffer backed by the specified data banks.
|
DataBufferFloat(float[][] dataArray, int size, int[] offsets) - Creates a new data buffer backed by the specified data banks, with
the specified offsets to the first element in each bank.
|
DataBufferFloat(int size) - Creates a new data buffer with a single data bank containing the
specified number of
float elements.
|
DataBufferFloat(int size, int numBanks) - Creates a new data buffer with the specified number of data banks,
each containing the specified number of
float elements.
|
float[][] | getBankData() - Returns the array underlying this
DataBuffer .
|
float[] | getData() - Returns the first data bank.
|
float[] | getData(int bank) - Returns a data bank.
|
int | getElem(int i) - Returns an element from the first data bank.
|
int | getElem(int bank, int i) - Returns an element from a particular data bank.
|
double | getElemDouble(int i) - Returns an element from the first data bank, converted to a
double .
|
double | getElemDouble(int bank, int i) - Returns an element from a particular data bank, converted to a
double .
|
float | getElemFloat(int i) - Returns an element from the first data bank, converted to a
float .
|
float | getElemFloat(int bank, int i) - Returns an element from a particular data bank, converted to a
float .
|
void | setElem(int i, int val) - Sets an element in the first data bank.
|
void | setElem(int bank, int i, int val) - Sets an element in a particular data bank.
|
void | setElemDouble(int i, double val) - Sets an element in the first data bank.
|
void | setElemDouble(int bank, int i, double val) - Sets an element in a particular data bank.
|
void | setElemFloat(int i, float val) - Sets an element in the first data bank.
|
void | setElemFloat(int bank, int i, float val) - Sets an element in a particular data bank.
|
getDataType , getDataTypeSize , getElem , getElem , getElemDouble , getElemDouble , getElemFloat , getElemFloat , getNumBanks , getOffset , getOffsets , getSize , setElem , setElem , setElemDouble , setElemDouble , setElemFloat , setElemFloat |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
DataBufferFloat
public DataBufferFloat(float[] dataArray,
int size)
Creates a new data buffer backed by the specified data bank.
Note: there is no exception when
dataArray
is
null
, but in that case an exception will be thrown
later if you attempt to access the data buffer.
dataArray
- the data bank.size
- the number of elements in the data bank.
DataBufferFloat
public DataBufferFloat(float[] dataArray,
int size,
int offset)
Creates a new data buffer backed by the specified data bank, with
the specified offset to the first element.
Note: there is no exception when
dataArray
is
null
, but in that case an exception will be thrown
later if you attempt to access the data buffer.
dataArray
- the data bank.size
- the number of elements in the data bank.offset
- the offset to the first element in the array.
DataBufferFloat
public DataBufferFloat(float[][] dataArray,
int size)
Creates a new data buffer backed by the specified data banks.
dataArray
- the data banks.size
- the number of elements in the data bank.
DataBufferFloat
public DataBufferFloat(float[][] dataArray,
int size,
int[] offsets)
Creates a new data buffer backed by the specified data banks, with
the specified offsets to the first element in each bank.
dataArray
- the data banks.size
- the number of elements in the data bank.offsets
- the offsets to the first element in each data bank.
DataBufferFloat
public DataBufferFloat(int size)
Creates a new data buffer with a single data bank containing the
specified number of float
elements.
size
- the number of elements in the data bank.
DataBufferFloat
public DataBufferFloat(int size,
int numBanks)
Creates a new data buffer with the specified number of data banks,
each containing the specified number of float
elements.
size
- the number of elements in the data bank.numBanks
- the number of data banks.
getBankData
public float[][] getBankData()
Returns the array underlying this DataBuffer
.
getData
public float[] getData()
Returns the first data bank.
getData
public float[] getData(int bank)
Returns a data bank.
getElem
public int getElem(int i)
Returns an element from the first data bank. The offset (specified in
the constructor) is added to i
before accessing the
underlying data array.
- getElem in interface DataBuffer
getElem
public int getElem(int bank,
int i)
Returns an element from a particular data bank. The offset (specified in
the constructor) is added to i
before accessing the
underlying data array.
- getElem in interface DataBuffer
bank
- the bank index.i
- the element index.
getElemDouble
public double getElemDouble(int i)
Returns an element from the first data bank, converted to a
double
. The offset (specified in the constructor) is added
to i
before accessing the underlying data array.
- getElemDouble in interface DataBuffer
getElemDouble
public double getElemDouble(int bank,
int i)
Returns an element from a particular data bank, converted to a
double
. The offset (specified in the constructor) is
added to i
before accessing the underlying data array.
- getElemDouble in interface DataBuffer
bank
- the bank index.i
- the element index.
getElemFloat
public float getElemFloat(int i)
Returns an element from the first data bank, converted to a
float
. The offset (specified in the constructor) is added
to i
before accessing the underlying data array.
- getElemFloat in interface DataBuffer
getElemFloat
public float getElemFloat(int bank,
int i)
Returns an element from a particular data bank, converted to a
float
. The offset (specified in the constructor) is
added to i
before accessing the underlying data array.
- getElemFloat in interface DataBuffer
bank
- the bank index.i
- the element index.
setElem
public void setElem(int i,
int val)
Sets an element in the first data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElem in interface DataBuffer
i
- the element index.val
- the new element value.
setElem
public void setElem(int bank,
int i,
int val)
Sets an element in a particular data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElem in interface DataBuffer
bank
- the data bank index.i
- the element index.val
- the new element value.
setElemDouble
public void setElemDouble(int i,
double val)
Sets an element in the first data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElemDouble in interface DataBuffer
i
- the element index.val
- the new element value.
setElemDouble
public void setElemDouble(int bank,
int i,
double val)
Sets an element in a particular data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElemDouble in interface DataBuffer
bank
- the data bank index.i
- the element index.val
- the new element value.
setElemFloat
public void setElemFloat(int i,
float val)
Sets an element in the first data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElemFloat in interface DataBuffer
i
- the element index.val
- the new element value.
setElemFloat
public void setElemFloat(int bank,
int i,
float val)
Sets an element in a particular data bank. The offset (specified in the
constructor) is added to i
before updating the underlying
data array.
- setElemFloat in interface DataBuffer
bank
- the data bank index.i
- the element index.val
- the new element value.
Copyright (C) 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.