Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.image

Class IndexColorModel

java.lang.Object
|
+--java.awt.image.ColorModel
   |
   +--java.awt.image.IndexColorModel


public class IndexColorModel

extends ColorModel

Author:

Constructor Summary

IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues)

Each array much contain size elements.
IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans)

Each array much contain size elements.
IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, byte[] alphas)

Each array much contain size elements.
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha)

Each array much contain size elements.
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha, int trans)

Each array much contain size elements.

Method Summary

intgetAlpha(int pixel)

Get the alpha component of the given pixel.
voidgetAlphas(byte[] a)


intgetBlue(int pixel)

Get the blue component of the given pixel.
voidgetBlues(byte[] b)


intgetGreen(int pixel)

Get the green component of the given pixel.
voidgetGreens(byte[] g)


intgetMapSize()

intgetRGB(int pixel)

Get the RGB color value of the given pixel using the default RGB color model.
intgetRed(int pixel)

Get the red component of the given pixel.
voidgetReds(byte[] r)


intgetTransparentPixel()

Get the index of the transparent color in this color model

Constructor Details

IndexColorModel

public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues)

Each array much contain size elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.

Parameters:


IndexColorModel

public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, byte[] alphas)

Each array much contain size elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.

Parameters:


IndexColorModel

public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans)

Each array much contain size elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.

Parameters:


IndexColorModel

public IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha)

Each array much contain size elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.

Parameters:


IndexColorModel

public IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha, int trans)

Each array much contain size elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.

Parameters:


Method Details

getAlpha

public final int getAlpha(int pixel)

Get the alpha component of the given pixel.

Parameters:


getAlphas

public final void getAlphas(byte[] a)


Parameters:


getBlue

public final int getBlue(int pixel)

Get the blue component of the given pixel.

Parameters:


getBlues

public final void getBlues(byte[] b)


Parameters:


getGreen

public final int getGreen(int pixel)

Get the green component of the given pixel.

Parameters:


getGreens

public final void getGreens(byte[] g)


Parameters:


getMapSize

public final int getMapSize()


getRGB

public final int getRGB(int pixel)

Get the RGB color value of the given pixel using the default RGB color model.

Parameters:


getRed

public final int getRed(int pixel)

Get the red component of the given pixel.

Parameters:


getReds

public final void getReds(byte[] r)


Parameters:


getTransparentPixel

public final int getTransparentPixel()

Get the index of the transparent color in this color model