Top Inners Fields Constructors Methods
com.sun.javafx.image.impl

pack-priv abstract Class BaseIndexedToByteConverter

extends Object
implements ByteToBytePixelConverter
Class Inheritance
All Implemented Interfaces
com.sun.javafx.image.ByteToBytePixelConverter, com.sun.javafx.image.PixelConverter
Known Direct Subclasses
com.sun.javafx.image.impl.EightBitIndexed.ToByteBgraAnyConverter, com.sun.javafx.image.impl.EightBitIndexed.ToByteRgbConverter, com.sun.javafx.image.impl.FourBitIndexed.ToByteBgraAnyConverter, com.sun.javafx.image.impl.FourBitIndexed.ToByteRgbConverter, com.sun.javafx.image.impl.OneBitIndexed.ToByteBgraAnyConverter, com.sun.javafx.image.impl.OneBitIndexed.ToByteRgbConverter, com.sun.javafx.image.impl.TwoBitIndexed.ToByteBgraAnyConverter, com.sun.javafx.image.impl.TwoBitIndexed.ToByteRgbConverter
Imports
com.sun.javafx.image.AlphaType, .BytePixelGetter, .BytePixelSetter, .ByteToBytePixelConverter, .PixelUtils, java.nio.ByteBuffer

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class

Field Summary

Modifier and TypeField and Description
protected final BaseIndexedToByteConverter.IndexedGetter
protected final int
protected final int
protected final BytePixelSetter

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
convert(byte[]
the byte array containing the source data
srcarr
,
int
the index in the array of the first source pixel data
srcoff
,
int
number of array indices between rows of data in the source
srcscanbytes
,
byte[]
the nio buffer containing the destination data
dstarr
,
int
the index in the array of the first destination pixel data
dstoff
,
int
number of array indices between rows of data in the destination
dstscanbytes
,
int
the number of pixels to process across before moving to the next row
w
,
int
the number of rows of pixels to process
h
)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source array to the destination array using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcarr[srcpos + j];
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstarr[dstpos + k] = pixel data;
    }
}
public final void
convert(ByteBuffer
the nio buffer containing the source data
srcbuf
,
int
the absolute location in the buffer of the first source pixel data
srcoff
,
int
number of buffer elements between rows of data in the source
srcscanbytes
,
ByteBuffer
the nio buffer containing the destination data
dstbuf
,
int
the absolute location in the buffer of the first destination pixel data
dstoff
,
int
number of buffer elements between rows of data in the destination
dstscanbytes
,
int
the number of pixels to process across before moving to the next row
w
,
int
the number of rows of pixels to process
h
)

Implements com.sun.javafx.image.PixelConverter.convert.

Copies a rectangular region of data from the source buffer to the destination buffer using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanelems + x * srcelemsperpixel + srcoff;
    int dstpos = y * dstscanelems + x * dstelemsperpixel + dstoff;
    for each j : 0 <= j < srcelemsperpixel {
        load data from srcbuf.get(srcpos + j);
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstelemsperpixel {
        store data into dstbuf.put(dstpos + k, pixel data);
    }
}
public final void
convert(ByteBuffer
the nio buffer containing the source data
srcbuf
,
int
the absolute location in the buffer of the first source pixel data
srcoff
,
int
number of buffer elements between rows of data in the source
srcscanbytes
,
byte[]
the nio buffer containing the destination data
dstarr
,
int
the index in the array of the first destination pixel data
dstoff
,
int
number of array indices between rows of data in the destination
dstscanbytes
,
int
the number of pixels to process across before moving to the next row
w
,
int
the number of rows of pixels to process
h
)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source buffer to the destination array using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcbuf.get(srcpos + j);
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstarr[dstpos + k] = pixel data;
    }
}
public final void
convert(byte[]
the byte array containing the source data
srcarr
,
int
the index in the array of the first source pixel data
srcoff
,
int
number of array indices between rows of data in the source
srcscanbytes
,
ByteBuffer
the nio buffer containing the destination data
dstbuf
,
int
the absolute location in the buffer of the first destination pixel data
dstoff
,
int
number of buffer elements between rows of data in the destination
dstscanbytes
,
int
the number of pixels to process across before moving to the next row
w
,
int
the number of rows of pixels to process
h
)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source array to the destination buffer using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcarr[srcpos + j];
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstbuf.put(dstpos + k, pixel data);
    }
}
pack-priv abstract void
doConvert(byte[] srcarr, int srcoff, int srcscanbytes, byte[] dstarr, int dstoff, int dstscanbytes, int w, int h)

pack-priv abstract void
doConvert(ByteBuffer srcbuf, int srcoff, int srcscanbytes, ByteBuffer dstbuf, int dstoff, int dstscanbytes, int w, int h)

public final BaseIndexedToByteConverter.IndexedGetter
public final BytePixelSetter
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

getterback to summary
protected final BaseIndexedToByteConverter.IndexedGetter getter
nDstElemsback to summary
protected final int nDstElems
nSrcElemsback to summary
protected final int nSrcElems
setterback to summary
protected final BytePixelSetter setter

Constructor Detail

BaseIndexedToByteConverterback to summary
pack-priv BaseIndexedToByteConverter(BaseIndexedToByteConverter.IndexedGetter getter, BytePixelSetter setter)

Method Detail

convertback to summary
public final void convert(byte[] srcarr, int srcoff, int srcscanbytes, byte[] dstarr, int dstoff, int dstscanbytes, int w, int h)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Doc from com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source array to the destination array using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcarr[srcpos + j];
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstarr[dstpos + k] = pixel data;
    }
}
Parameters
srcarr:byte[]

the byte array containing the source data

srcoff:int

the index in the array of the first source pixel data

srcscanbytes:int

number of array indices between rows of data in the source

dstarr:byte[]

Doc from com.sun.javafx.image.PixelConverter.convert.

the nio buffer containing the destination data

dstoff:int

the index in the array of the first destination pixel data

dstscanbytes:int

number of array indices between rows of data in the destination

w:int

the number of pixels to process across before moving to the next row

h:int

the number of rows of pixels to process

Annotations
@Override
convertback to summary
public final void convert(ByteBuffer srcbuf, int srcoff, int srcscanbytes, ByteBuffer dstbuf, int dstoff, int dstscanbytes, int w, int h)

Implements com.sun.javafx.image.PixelConverter.convert.

Doc from com.sun.javafx.image.PixelConverter.convert.

Copies a rectangular region of data from the source buffer to the destination buffer using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanelems + x * srcelemsperpixel + srcoff;
    int dstpos = y * dstscanelems + x * dstelemsperpixel + dstoff;
    for each j : 0 <= j < srcelemsperpixel {
        load data from srcbuf.get(srcpos + j);
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstelemsperpixel {
        store data into dstbuf.put(dstpos + k, pixel data);
    }
}
Parameters
srcbuf:ByteBuffer

the nio buffer containing the source data

srcoff:int

the absolute location in the buffer of the first source pixel data

srcscanbytes:int

number of buffer elements between rows of data in the source

dstbuf:ByteBuffer

the nio buffer containing the destination data

dstoff:int

the absolute location in the buffer of the first destination pixel data

dstscanbytes:int

number of buffer elements between rows of data in the destination

w:int

the number of pixels to process across before moving to the next row

h:int

the number of rows of pixels to process

Annotations
@Override
convertback to summary
public final void convert(ByteBuffer srcbuf, int srcoff, int srcscanbytes, byte[] dstarr, int dstoff, int dstscanbytes, int w, int h)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Doc from com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source buffer to the destination array using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcbuf.get(srcpos + j);
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstarr[dstpos + k] = pixel data;
    }
}
Parameters
srcbuf:ByteBuffer

the nio buffer containing the source data

srcoff:int

the absolute location in the buffer of the first source pixel data

srcscanbytes:int

number of buffer elements between rows of data in the source

dstarr:byte[]

Doc from com.sun.javafx.image.PixelConverter.convert.

the nio buffer containing the destination data

dstoff:int

the index in the array of the first destination pixel data

dstscanbytes:int

number of array indices between rows of data in the destination

w:int

the number of pixels to process across before moving to the next row

h:int

the number of rows of pixels to process

Annotations
@Override
convertback to summary
public final void convert(byte[] srcarr, int srcoff, int srcscanbytes, ByteBuffer dstbuf, int dstoff, int dstscanbytes, int w, int h)

Implements com.sun.javafx.image.ByteToBytePixelConverter.convert.

Doc from com.sun.javafx.image.ByteToBytePixelConverter.convert.

Copies a rectangular region of data from the source array to the destination buffer using the following relationship:

for each xy : 0 <= x,y < w,h {
    int srcpos = y * srcscanbytes + x * srcbytesperpixel + srcoff;
    int dstpos = y * dstscanbytes + x * dstbytesperpixel + dstoff;
    for each j : 0 <= j < srcbytesperpixel {
        load data from srcarr[srcpos + j];
    }
    convert data to destination pixel format
    for each k : 0 <= k < dstbytesperpixel {
        store data into dstbuf.put(dstpos + k, pixel data);
    }
}
Parameters
srcarr:byte[]

the byte array containing the source data

srcoff:int

the index in the array of the first source pixel data

srcscanbytes:int

number of array indices between rows of data in the source

dstbuf:ByteBuffer

the nio buffer containing the destination data

dstoff:int

the absolute location in the buffer of the first destination pixel data

dstscanbytes:int

number of buffer elements between rows of data in the destination

w:int

the number of pixels to process across before moving to the next row

h:int

the number of rows of pixels to process

Annotations
@Override
doConvertback to summary
pack-priv abstract void doConvert(byte[] srcarr, int srcoff, int srcscanbytes, byte[] dstarr, int dstoff, int dstscanbytes, int w, int h)
doConvertback to summary
pack-priv abstract void doConvert(ByteBuffer srcbuf, int srcoff, int srcscanbytes, ByteBuffer dstbuf, int dstoff, int dstscanbytes, int w, int h)
getGetterback to summary
public final BaseIndexedToByteConverter.IndexedGetter getGetter()

Implements com.sun.javafx.image.PixelConverter.getGetter.

Annotations
@Override
getSetterback to summary
public final BytePixelSetter getSetter()

Implements com.sun.javafx.image.PixelConverter.getSetter.

Annotations
@Override
com.sun.javafx.image.impl back to summary

pack-priv abstract Class BaseIndexedToByteConverter.IndexedGetter

extends Object
implements BytePixelGetter
Class Inheritance
  • java.lang.Object
  • com.sun.javafx.image.impl.BaseIndexedToByteConverter.IndexedGetter
All Implemented Interfaces
com.sun.javafx.image.BytePixelGetter, com.sun.javafx.image.PixelGetter
Known Direct Subclasses
com.sun.javafx.image.impl.EightBitIndexed.Getter, com.sun.javafx.image.impl.FourBitIndexed.Getter, com.sun.javafx.image.impl.OneBitIndexed.Getter, com.sun.javafx.image.impl.TwoBitIndexed.Getter

Field Summary

Modifier and TypeField and Description
private final AlphaType
pack-priv final int[]
pack-priv final int[]

Constructor Summary

AccessConstructor and Description
pack-priv
IndexedGetter(int[] colors, AlphaType alphaType)

Method Summary

Modifier and TypeMethod and Description
public AlphaType
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alphaTypeback to summary
private final AlphaType alphaType
nonPreColorsback to summary
pack-priv final int[] nonPreColors
preColorsback to summary
pack-priv final int[] preColors

Constructor Detail

IndexedGetterback to summary
pack-priv IndexedGetter(int[] colors, AlphaType alphaType)

Method Detail

getAlphaTypeback to summary
public AlphaType getAlphaType()

Implements com.sun.javafx.image.PixelGetter.getAlphaType.

Annotations
@Override