|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.graphics.ImageData
Unsafe:
Field Summary | |
int |
alpha
Suppressed: The global alpha value to be used for every pixel. |
(package private) static int |
ALPHA_CHANNEL_SEPARATE
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_CHANNEL_SOURCE
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_MASK_INDEX
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_MASK_PACKED
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_MASK_RGB
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_MASK_UNPACKED
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_OPAQUE
Alpha mode, values 0 - 255 specify global alpha level |
(package private) static int |
ALPHA_TRANSPARENT
Alpha mode, values 0 - 255 specify global alpha level |
byte[] |
alphaData
Suppressed: The alpha data of the image. |
(package private) static byte[][] |
ANY_TO_EIGHT
Arbitrary channel width data to 8-bit conversion table. |
(package private) static int |
BLIT_ALPHA
Blit operation bits to be OR'ed together to specify the desired operation. |
(package private) static int |
BLIT_DITHER
Blit operation bits to be OR'ed together to specify the desired operation. |
(package private) static int |
BLIT_SRC
Blit operation bits to be OR'ed together to specify the desired operation. |
int |
bytesPerLine
Suppressed: The number of bytes per scanline. |
byte[] |
data
Suppressed: The pixel data of the image. |
int |
delayTime
Suppressed: The time to delay before displaying the next image in an animation (this field corresponds to the GIF89a Delay Time value). |
int |
depth
Suppressed: The color depth of the image, in bits per pixel. |
int |
disposalMethod
Suppressed: A description of how to dispose of the current image before displaying the next. |
(package private) static int[][] |
DITHER_MATRIX
Scaled 8x8 Bayer dither matrix. |
int |
height
Suppressed: The height of the image, in pixels. |
(package private) static int |
LSB_FIRST
Byte and bit order constants. |
byte[] |
maskData
Suppressed: An icon-specific field containing the data from the icon mask. |
int |
maskPad
Suppressed: An icon-specific field containing the scanline pad of the mask. |
(package private) static int |
MSB_FIRST
|
(package private) static byte[] |
ONE_TO_ONE_MAPPING
|
PaletteData |
palette
Suppressed: The color table for the image. |
int |
scanlinePad
Suppressed: The scanline padding. |
int |
transparentPixel
Suppressed: The transparent pixel. |
int |
type
Suppressed: The type of file from which the image was read. |
private static int |
TYPE_GENERIC_16_LSB
Data types (internal) |
private static int |
TYPE_GENERIC_16_MSB
Data types (internal) |
private static int |
TYPE_GENERIC_24
Data types (internal) |
private static int |
TYPE_GENERIC_32_LSB
Data types (internal) |
private static int |
TYPE_GENERIC_32_MSB
Data types (internal) |
private static int |
TYPE_GENERIC_8
Data types (internal) |
private static int |
TYPE_INDEX_1_LSB
Data types (internal) |
private static int |
TYPE_INDEX_1_MSB
Data types (internal) |
private static int |
TYPE_INDEX_2
Data types (internal) |
private static int |
TYPE_INDEX_4
Data types (internal) |
private static int |
TYPE_INDEX_8
Data types (internal) |
int |
width
Suppressed: The width of the image, in pixels. |
int |
x
Suppressed: The x coordinate of the top left corner of the image within the logical screen (this field corresponds to the GIF89a Image Left Position value). |
int |
y
Suppressed: The y coordinate of the top left corner of the image within the logical screen (this field corresponds to the GIF89a Image Top Position value). |
Constructor Summary | |
(package private) |
ImageData()
Prevents uninitialized instances from being created outside the package. |
|
ImageData(InputStream stream)
Suppressed: Constructs an ImageData loaded from the specified
input stream. |
|
ImageData(int width,
int height,
int depth,
PaletteData palette)
Suppressed: Constructs a new, empty ImageData with the given width, height, depth and palette. |
|
ImageData(int width,
int height,
int depth,
PaletteData palette,
int scanlinePad,
byte[] data)
Suppressed: Constructs a new, empty ImageData with the given width, height, depth, palette, scanlinePad and data. |
(package private) |
ImageData(int width,
int height,
int depth,
PaletteData palette,
int scanlinePad,
byte[] data,
int maskPad,
byte[] maskData,
byte[] alphaData,
int alpha,
int transparentPixel,
int type,
int x,
int y,
int disposalMethod,
int delayTime)
Constructs an image data by giving values for all non-computable fields. |
|
ImageData(String filename)
Suppressed: Constructs an ImageData loaded from a file with the
specified name. |
Method Summary | |
(package private) static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
byte[] srcReds,
byte[] srcGreens,
byte[] srcBlues,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
byte[] destReds,
byte[] destGreens,
byte[] destBlues,
boolean flipX,
boolean flipY)
Blits an index palette image into an index palette image. |
(package private) static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
byte[] srcReds,
byte[] srcGreens,
byte[] srcBlues,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
int destRedMask,
int destGreenMask,
int destBlueMask,
boolean flipX,
boolean flipY)
Blits an index palette image into a direct palette image. |
(package private) static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int srcRedMask,
int srcGreenMask,
int srcBlueMask,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
byte[] destReds,
byte[] destGreens,
byte[] destBlues,
boolean flipX,
boolean flipY)
Blits a direct palette image into an index palette image. |
(package private) static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int srcRedMask,
int srcGreenMask,
int srcBlueMask,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
int destRedMask,
int destGreenMask,
int destBlueMask,
boolean flipX,
boolean flipY)
Blits a direct palette image into a direct palette image. |
(package private) static void |
buildDitheredGradientChannel(int from,
int to,
int steps,
int bandWidth,
int bandHeight,
boolean vertical,
byte[] bitmapData,
int dp,
int bytesPerLine,
int bits)
|
(package private) static void |
buildPreciseGradientChannel(int from,
int to,
int steps,
int bandWidth,
int bandHeight,
boolean vertical,
byte[] bitmapData,
int dp,
int bytesPerLine)
|
(package private) static PaletteData |
bwPalette()
Returns a palette with 2 colors: black & white. |
(package private) static byte[] |
checkData(byte[] data)
|
Object |
clone()
Suppressed: Returns a new instance of the same class as the receiver, whose slots have been filled in with copies of the values in the slots of the receiver. |
(package private) static int |
closestMatch(int depth,
byte red,
byte green,
byte blue,
int redMask,
int greenMask,
int blueMask,
byte[] reds,
byte[] greens,
byte[] blues)
Finds the closest match. |
(package private) ImageData |
colorMaskImage(int pixel)
|
(package private) static ImageData |
createGradientBand(int width,
int height,
boolean vertical,
RGB fromRGB,
RGB toRGB,
int redBits,
int greenBits,
int blueBits)
Creates an ImageData containing one band's worth of a gradient filled block. |
(package private) static void |
fillGradientRectangle(GC gc,
Device device,
int x,
int y,
int width,
int height,
boolean vertical,
RGB fromRGB,
RGB toRGB,
int redBits,
int greenBits,
int blueBits)
Renders a gradient onto a GC. |
int |
getAlpha(int x,
int y)
Suppressed: Returns the alpha value at offset x in
scanline y in the receiver's alpha data. |
void |
getAlphas(int x,
int y,
int getWidth,
byte[] alphas,
int startIndex)
Suppressed: Returns getWidth alpha values starting at offset
x in scanline y in the receiver's alpha
data starting at startIndex . |
(package private) int |
getByteOrder()
Returns the byte order of the receiver. |
(package private) static byte |
getChannelField(int data,
int mask)
Extracts a field from packed RGB data given a mask for that field. |
(package private) static int |
getChannelShift(int mask)
Computes the required channel shift from a mask. |
(package private) static int |
getChannelWidth(int mask,
int shift)
Computes the required channel width (depth) from a mask. |
(package private) static int |
getMSBOffset(int mask)
Gets the offset of the most significant bit for the given mask. |
int |
getPixel(int x,
int y)
Suppressed: Returns the pixel value at offset x in
scanline y in the receiver's data. |
void |
getPixels(int x,
int y,
int getWidth,
byte[] pixels,
int startIndex)
Suppressed: Returns getWidth pixel values starting at offset
x in scanline y in the receiver's
data starting at startIndex . |
void |
getPixels(int x,
int y,
int getWidth,
int[] pixels,
int startIndex)
Suppressed: Returns getWidth pixel values starting at offset
x in scanline y in the receiver's
data starting at startIndex . |
RGB[] |
getRGBs()
Suppressed: Returns an array of RGB s which comprise the
indexed color table of the receiver, or null if the receiver
has a direct color model. |
ImageData |
getTransparencyMask()
Suppressed: Returns an ImageData which specifies the
transparency mask information for the receiver, or null if the
receiver has no transparency and is not an icon. |
int |
getTransparencyType()
Suppressed: Returns the image transparency type. |
static ImageData |
internal_new(int width,
int height,
int depth,
PaletteData palette,
int scanlinePad,
byte[] data,
int maskPad,
byte[] maskData,
byte[] alphaData,
int alpha,
int transparentPixel,
int type,
int x,
int y,
int disposalMethod,
int delayTime)
Suppressed: Invokes internal SWT functionality to create a new instance of this class. |
ImageData |
scaledTo(int width,
int height)
Suppressed: Returns a copy of the receiver which has been stretched or shrunk to the specified size. |
(package private) void |
setAllFields(int width,
int height,
int depth,
int scanlinePad,
int bytesPerLine,
byte[] data,
PaletteData palette,
int transparentPixel,
byte[] maskData,
int maskPad,
byte[] alphaData,
int alpha,
int type,
int x,
int y,
int disposalMethod,
int delayTime)
Initializes all fields in the receiver. |
void |
setAlpha(int x,
int y,
int alpha)
Suppressed: Sets the alpha value at offset x in
scanline y in the receiver's alpha data. |
void |
setAlphas(int x,
int y,
int putWidth,
byte[] alphas,
int startIndex)
Suppressed: Sets the alpha values starting at offset x in
scanline y in the receiver's alpha data to the
values from the array alphas starting at
startIndex . |
void |
setPixel(int x,
int y,
int pixelValue)
Suppressed: Sets the pixel value at offset x in
scanline y in the receiver's data. |
void |
setPixels(int x,
int y,
int putWidth,
byte[] pixels,
int startIndex)
Suppressed: Sets the pixel values starting at offset x in
scanline y in the receiver's data to the
values from the array pixels starting at
startIndex . |
void |
setPixels(int x,
int y,
int putWidth,
int[] pixels,
int startIndex)
Suppressed: Sets the pixel values starting at offset x in
scanline y in the receiver's data to the
values from the array pixels starting at
startIndex . |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int width
public int height
public int depth
Note that a depth of 8 or less does not necessary mean that the image is palette indexed, or conversely that a depth greater than 8 means that the image is direct color. Check the associated PaletteData's isDirect field for such determinations.
public int scanlinePad
If one scanline of the image is not a multiple of this number, it will be padded with zeros until it is.
public int bytesPerLine
This is a multiple of the scanline padding.
public byte[] data
Note that for 16 bit depth images the pixel data is stored in least significant byte order; however, for 24bit and 32bit depth images the pixel data is stored in most significant byte order.
public PaletteData palette
public int transparentPixel
Pixels with this value are transparent.
The default is -1 which means 'no transparent pixel'.
public byte[] maskData
This is a 1 bit bitmap stored with the most significant bit first. The number of bytes per scanline is '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.
The default is null which means 'no transparency mask'.
public int maskPad
If one scanline of the transparency mask is not a multiple of this number, it will be padded with zeros until it is.
public byte[] alphaData
Every pixel can have an alpha blending value that varies from 0, meaning fully transparent, to 255 meaning fully opaque. The number of bytes per scanline is 'width'.
public int alpha
If this value is set, the alphaData
field
is ignored and when the image is rendered each pixel
will be blended with the background an amount
proportional to this value.
The default is -1 which means 'no global alpha value'
public int type
IMAGE_BMP
IMAGE_BMP_RLE
IMAGE_GIF
IMAGE_ICO
IMAGE_JPEG
IMAGE_PNG
public int x
public int y
public int disposalMethod
DM_UNSPECIFIED
DM_FILL_NONE
DM_FILL_BACKGROUND
DM_FILL_PREVIOUS
public int delayTime
static final byte[][] ANY_TO_EIGHT
static final byte[] ONE_TO_ONE_MAPPING
static final int[][] DITHER_MATRIX
static final int BLIT_SRC
static final int BLIT_ALPHA
static final int BLIT_DITHER
static final int ALPHA_OPAQUE
static final int ALPHA_TRANSPARENT
static final int ALPHA_CHANNEL_SEPARATE
static final int ALPHA_CHANNEL_SOURCE
static final int ALPHA_MASK_UNPACKED
static final int ALPHA_MASK_PACKED
static final int ALPHA_MASK_INDEX
static final int ALPHA_MASK_RGB
static final int LSB_FIRST
static final int MSB_FIRST
private static final int TYPE_GENERIC_8
private static final int TYPE_GENERIC_16_MSB
private static final int TYPE_GENERIC_16_LSB
private static final int TYPE_GENERIC_24
private static final int TYPE_GENERIC_32_MSB
private static final int TYPE_GENERIC_32_LSB
private static final int TYPE_INDEX_8
private static final int TYPE_INDEX_4
private static final int TYPE_INDEX_2
private static final int TYPE_INDEX_1_MSB
private static final int TYPE_INDEX_1_LSB
Constructor Detail |
public ImageData(int width, int height, int depth, PaletteData palette)
width
- the width of the imageheight
- the height of the imagedepth
- the depth of the imagepalette
- the palette of the image (must not be null)public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data)
width
- the width of the imageheight
- the height of the imagedepth
- the depth of the imagepalette
- the palette of the imagescanlinePad
- the padding of each line, in bytesdata
- the data of the imagepublic ImageData(InputStream stream)
ImageData
loaded from the specified
input stream. Throws an error if an error occurs while loading
the image, or if the image has an unsupported type.
This constructor is provided for convenience when loading a single
image only. If the stream contains multiple images, only the first
one will be loaded. To load multiple images, use
ImageLoader.load()
.
stream
- the input stream to load the image from (must not be null)ImageLoader.load(java.io.InputStream)
public ImageData(String filename)
ImageData
loaded from a file with the
specified name. Throws an error if an error occurs loading the
image, or if the image has an unsupported type.
This constructor is provided for convenience when loading a single
image only. If the file contains multiple images, only the first
one will be loaded. To load multiple images, use
ImageLoader.load()
.
filename
- the name of the file to load the image from (must not be null)ImageData()
ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime)
This method is for internal use, and is not described further.
Method Detail |
void setAllFields(int width, int height, int depth, int scanlinePad, int bytesPerLine, byte[] data, PaletteData palette, int transparentPixel, byte[] maskData, int maskPad, byte[] alphaData, int alpha, int type, int x, int y, int disposalMethod, int delayTime)
This method is for internal use, and is not described further.
public static ImageData internal_new(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime)
IMPORTANT: This method is not part of the public
API for ImageData
. It is marked public only so that it
can be shared within the packages provided by SWT. It is subject
to change without notice, and should never be called from
application code.
This method is for internal use, and is not described further.
ImageData colorMaskImage(int pixel)
static byte[] checkData(byte[] data)
public Object clone()
clone
in class Object
java.lang.Cloneable
public int getAlpha(int x, int y)
x
in
scanline y
in the receiver's alpha data.
x
- the x coodinate of the pixel to get the alpha value ofy
- the y coordinate of the pixel to get the alpha value of
public void getAlphas(int x, int y, int getWidth, byte[] alphas, int startIndex)
getWidth
alpha values starting at offset
x
in scanline y
in the receiver's alpha
data starting at startIndex
.
x
- the x position of the pixel to begin getting alpha valuesy
- the y position of the pixel to begin getting alpha valuesgetWidth
- the width of the data to getalphas
- the buffer in which to put the alpha valuesstartIndex
- the offset into the image to begin getting alpha valuespublic int getPixel(int x, int y)
x
in
scanline y
in the receiver's data.
x
- the x position of the pixel to gety
- the y position of the pixel to get
public void getPixels(int x, int y, int getWidth, byte[] pixels, int startIndex)
getWidth
pixel values starting at offset
x
in scanline y
in the receiver's
data starting at startIndex
.
x
- the x position of the first pixel to gety
- the y position of the first pixel to getgetWidth
- the width of the data to getpixels
- the buffer in which to put the pixelsstartIndex
- the offset into the byte array to begin storing pixelspublic void getPixels(int x, int y, int getWidth, int[] pixels, int startIndex)
getWidth
pixel values starting at offset
x
in scanline y
in the receiver's
data starting at startIndex
.
x
- the x position of the first pixel to gety
- the y position of the first pixel to getgetWidth
- the width of the data to getpixels
- the buffer in which to put the pixelsstartIndex
- the offset into the buffer to begin storing pixelspublic RGB[] getRGBs()
RGB
s which comprise the
indexed color table of the receiver, or null if the receiver
has a direct color model.
PaletteData.getRGBs()
public ImageData getTransparencyMask()
ImageData
which specifies the
transparency mask information for the receiver, or null if the
receiver has no transparency and is not an icon.
public int getTransparencyType()
int getByteOrder()
public ImageData scaledTo(int width, int height)
width
- the width of the new ImageDataheight
- the height of the new ImageData
public void setAlpha(int x, int y, int alpha)
x
in
scanline y
in the receiver's alpha data.
x
- the x coordinate of the alpha value to sety
- the y coordinate of the alpha value to setalpha
- the value to set the alpha topublic void setAlphas(int x, int y, int putWidth, byte[] alphas, int startIndex)
x
in
scanline y
in the receiver's alpha data to the
values from the array alphas
starting at
startIndex
.
x
- the x coordinate of the pixel to being setting the alpha valuesy
- the y coordinate of the pixel to being setting the alpha valuesputWidth
- the width of the alpha values to setalphas
- the alpha values to setstartIndex
- the index at which to begin settingpublic void setPixel(int x, int y, int pixelValue)
x
in
scanline y
in the receiver's data.
x
- the x coordinate of the pixel to sety
- the y coordinate of the pixel to setpixelValue
- the value to set the pixel topublic void setPixels(int x, int y, int putWidth, byte[] pixels, int startIndex)
x
in
scanline y
in the receiver's data to the
values from the array pixels
starting at
startIndex
.
x
- the x position of the pixel to sety
- the y position of the pixel to setputWidth
- the width of the pixels to setpixels
- the pixels to setstartIndex
- the index at which to begin settingpublic void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex)
x
in
scanline y
in the receiver's data to the
values from the array pixels
starting at
startIndex
.
x
- the x position of the pixel to sety
- the y position of the pixel to setputWidth
- the width of the pixels to setpixels
- the pixels to setstartIndex
- the index at which to begin settingstatic PaletteData bwPalette()
static int getMSBOffset(int mask)
static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues)
static void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, int srcRedMask, int srcGreenMask, int srcBlueMask, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, int destRedMask, int destGreenMask, int destBlueMask, boolean flipX, boolean flipY)
Note: When the source and destination depth, order and masks are pairwise equal and the blitter operation is BLIT_SRC, the masks are ignored. Hence when not changing the image data format, 0 may be specified for the masks.
op
- the blitter operation: a combination of BLIT_xxx flags
(see BLIT_xxx constants)srcData
- the source byte array containing image datasrcDepth
- the source depth: one of 8, 16, 24, 32srcStride
- the source number of bytes per linesrcOrder
- the source byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if srcDepth is not 16 or 32srcX
- the top-left x-coord of the source blit regionsrcY
- the top-left y-coord of the source blit regionsrcWidth
- the width of the source blit regionsrcHeight
- the height of the source blit regionsrcRedMask
- the source red channel masksrcGreenMask
- the source green channel masksrcBlueMask
- the source blue channel maskalphaMode
- the alpha blending or mask mode, may be
an integer 0-255 for global alpha; ignored if BLIT_ALPHA
not specified in the blitter operations
(see ALPHA_MODE_xxx constants)alphaData
- the alpha blending or mask data, varies depending
on the value of alphaMode and sometimes ignoredalphaStride
- the alpha data number of bytes per linealphaX
- the top-left x-coord of the alpha blit regionalphaY
- the top-left y-coord of the alpha blit regiondestData
- the destination byte array containing image datadestDepth
- the destination depth: one of 8, 16, 24, 32destStride
- the destination number of bytes per linedestOrder
- the destination byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if destDepth is not 16 or 32destX
- the top-left x-coord of the destination blit regiondestY
- the top-left y-coord of the destination blit regiondestWidth
- the width of the destination blit regiondestHeight
- the height of the destination blit regiondestRedMask
- the destination red channel maskdestGreenMask
- the destination green channel maskdestBlueMask
- the destination blue channel maskflipX
- if true the resulting image is flipped along the vertical axisflipY
- if true the resulting image is flipped along the horizontal axisstatic void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, byte[] srcReds, byte[] srcGreens, byte[] srcBlues, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, byte[] destReds, byte[] destGreens, byte[] destBlues, boolean flipX, boolean flipY)
Note: The source and destination red, green, and blue arrays may be null if no alpha blending or dither is to be performed.
op
- the blitter operation: a combination of BLIT_xxx flags
(see BLIT_xxx constants)srcData
- the source byte array containing image datasrcDepth
- the source depth: one of 1, 2, 4, 8srcStride
- the source number of bytes per linesrcOrder
- the source byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if srcDepth is not 1srcX
- the top-left x-coord of the source blit regionsrcY
- the top-left y-coord of the source blit regionsrcWidth
- the width of the source blit regionsrcHeight
- the height of the source blit regionsrcReds
- the source palette red component intensitiessrcGreens
- the source palette green component intensitiessrcBlues
- the source palette blue component intensitiesalphaMode
- the alpha blending or mask mode, may be
an integer 0-255 for global alpha; ignored if BLIT_ALPHA
not specified in the blitter operations
(see ALPHA_MODE_xxx constants)alphaData
- the alpha blending or mask data, varies depending
on the value of alphaMode and sometimes ignoredalphaStride
- the alpha data number of bytes per linealphaX
- the top-left x-coord of the alpha blit regionalphaY
- the top-left y-coord of the alpha blit regiondestData
- the destination byte array containing image datadestDepth
- the destination depth: one of 1, 2, 4, 8destStride
- the destination number of bytes per linedestOrder
- the destination byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if destDepth is not 1destX
- the top-left x-coord of the destination blit regiondestY
- the top-left y-coord of the destination blit regiondestWidth
- the width of the destination blit regiondestHeight
- the height of the destination blit regiondestReds
- the destination palette red component intensitiesdestGreens
- the destination palette green component intensitiesdestBlues
- the destination palette blue component intensitiesflipX
- if true the resulting image is flipped along the vertical axisflipY
- if true the resulting image is flipped along the horizontal axisstatic void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, byte[] srcReds, byte[] srcGreens, byte[] srcBlues, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, int destRedMask, int destGreenMask, int destBlueMask, boolean flipX, boolean flipY)
Note: The source and destination masks and palettes must always be fully specified.
op
- the blitter operation: a combination of BLIT_xxx flags
(see BLIT_xxx constants)srcData
- the source byte array containing image datasrcDepth
- the source depth: one of 1, 2, 4, 8srcStride
- the source number of bytes per linesrcOrder
- the source byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if srcDepth is not 1srcX
- the top-left x-coord of the source blit regionsrcY
- the top-left y-coord of the source blit regionsrcWidth
- the width of the source blit regionsrcHeight
- the height of the source blit regionsrcReds
- the source palette red component intensitiessrcGreens
- the source palette green component intensitiessrcBlues
- the source palette blue component intensitiesalphaMode
- the alpha blending or mask mode, may be
an integer 0-255 for global alpha; ignored if BLIT_ALPHA
not specified in the blitter operations
(see ALPHA_MODE_xxx constants)alphaData
- the alpha blending or mask data, varies depending
on the value of alphaMode and sometimes ignoredalphaStride
- the alpha data number of bytes per linealphaX
- the top-left x-coord of the alpha blit regionalphaY
- the top-left y-coord of the alpha blit regiondestData
- the destination byte array containing image datadestDepth
- the destination depth: one of 8, 16, 24, 32destStride
- the destination number of bytes per linedestOrder
- the destination byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if destDepth is not 16 or 32destX
- the top-left x-coord of the destination blit regiondestY
- the top-left y-coord of the destination blit regiondestWidth
- the width of the destination blit regiondestHeight
- the height of the destination blit regiondestRedMask
- the destination red channel maskdestGreenMask
- the destination green channel maskdestBlueMask
- the destination blue channel maskflipX
- if true the resulting image is flipped along the vertical axisflipY
- if true the resulting image is flipped along the horizontal axisstatic void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, int srcRedMask, int srcGreenMask, int srcBlueMask, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, byte[] destReds, byte[] destGreens, byte[] destBlues, boolean flipX, boolean flipY)
Note: The source and destination masks and palettes must always be fully specified.
op
- the blitter operation: a combination of BLIT_xxx flags
(see BLIT_xxx constants)srcData
- the source byte array containing image datasrcDepth
- the source depth: one of 8, 16, 24, 32srcStride
- the source number of bytes per linesrcOrder
- the source byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if srcDepth is not 16 or 32srcX
- the top-left x-coord of the source blit regionsrcY
- the top-left y-coord of the source blit regionsrcWidth
- the width of the source blit regionsrcHeight
- the height of the source blit regionsrcRedMask
- the source red channel masksrcGreenMask
- the source green channel masksrcBlueMask
- the source blue channel maskalphaMode
- the alpha blending or mask mode, may be
an integer 0-255 for global alpha; ignored if BLIT_ALPHA
not specified in the blitter operations
(see ALPHA_MODE_xxx constants)alphaData
- the alpha blending or mask data, varies depending
on the value of alphaMode and sometimes ignoredalphaStride
- the alpha data number of bytes per linealphaX
- the top-left x-coord of the alpha blit regionalphaY
- the top-left y-coord of the alpha blit regiondestData
- the destination byte array containing image datadestDepth
- the destination depth: one of 1, 2, 4, 8destStride
- the destination number of bytes per linedestOrder
- the destination byte ordering: one of MSB_FIRST or LSB_FIRST;
ignored if destDepth is not 1destX
- the top-left x-coord of the destination blit regiondestY
- the top-left y-coord of the destination blit regiondestWidth
- the width of the destination blit regiondestHeight
- the height of the destination blit regiondestReds
- the destination palette red component intensitiesdestGreens
- the destination palette green component intensitiesdestBlues
- the destination palette blue component intensitiesflipX
- if true the resulting image is flipped along the vertical axisflipY
- if true the resulting image is flipped along the horizontal axisstatic int getChannelShift(int mask)
static int getChannelWidth(int mask, int shift)
static byte getChannelField(int data, int mask)
static ImageData createGradientBand(int width, int height, boolean vertical, RGB fromRGB, RGB toRGB, int redBits, int greenBits, int blueBits)
vertical
is true, the band must be tiled
horizontally to fill a region, otherwise it must be tiled vertically.
width
- the width of the region to be filledheight
- the height of the region to be filledvertical
- if true sweeps from top to bottom, else
sweeps from left to rightfromRGB
- the color to start withtoRGB
- the color to end withredBits
- the number of significant red bits, 0 for palette modesgreenBits
- the number of significant green bits, 0 for palette modesblueBits
- the number of significant blue bits, 0 for palette modes
static final void buildPreciseGradientChannel(int from, int to, int steps, int bandWidth, int bandHeight, boolean vertical, byte[] bitmapData, int dp, int bytesPerLine)
static final void buildDitheredGradientChannel(int from, int to, int steps, int bandWidth, int bandHeight, boolean vertical, byte[] bitmapData, int dp, int bytesPerLine, int bits)
static void fillGradientRectangle(GC gc, Device device, int x, int y, int width, int height, boolean vertical, RGB fromRGB, RGB toRGB, int redBits, int greenBits, int blueBits)
This is a GC helper.
gc
- the GC to render the gradient ontodevice
- the device the GC belongs tox
- the top-left x coordinate of the region to be filledy
- the top-left y coordinate of the region to be filledwidth
- the width of the region to be filledheight
- the height of the region to be filledvertical
- if true sweeps from top to bottom, else
sweeps from left to rightfromRGB
- the color to start withtoRGB
- the color to end withredBits
- the number of significant red bits, 0 for palette modesgreenBits
- the number of significant green bits, 0 for palette modesblueBits
- the number of significant blue bits, 0 for palette modes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |