public class

PixelConverter

extends Object
java.lang.Object
   ↳ sun.awt.image.PixelConverter
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class provides utilities for converting between the standard rgb colorspace specification and the equivalent value for a pixel of a given surface type. The class was designed for use by the SurfaceType objects, since the conversion between pixel values and rgb values is inherently tied to the type of surface we are dealing with. Some conversions cannot be done automatically, however (for example, the AnyInt or AnyDCM surface types), so we require the caller to pass in a ColorModel object so that we can calculate the pixel values in these generic cases as well.

Summary

Nested Classes
class PixelConverter.Argb  
class PixelConverter.ArgbBm  
class PixelConverter.ArgbPre  
class PixelConverter.Bgrx  
class PixelConverter.ByteGray  
class PixelConverter.Rgba  
class PixelConverter.RgbaPre  
class PixelConverter.Rgbx Subclasses of PixelConverter. 
class PixelConverter.Ushort4444Argb  
class PixelConverter.Ushort555Rgb  
class PixelConverter.Ushort555Rgbx  
class PixelConverter.Ushort565Rgb  
class PixelConverter.UshortGray  
class PixelConverter.Xbgr  
class PixelConverter.Xrgb  
Fields
protected int alphaMask
public static final PixelConverter instance Default object, used as a fallback for any surface types where we do not know enough about the surface to calculate the conversions directly.
Protected Constructors
PixelConverter()
Public Methods
final int getAlphaMask()
int pixelToRgb(int pixel, ColorModel cm)
int rgbToPixel(int rgb, ColorModel cm)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected int alphaMask

public static final PixelConverter instance

Default object, used as a fallback for any surface types where we do not know enough about the surface to calculate the conversions directly. We use the ColorModel object to assist us in these cases.

Protected Constructors

protected PixelConverter ()

Public Methods

public final int getAlphaMask ()

public int pixelToRgb (int pixel, ColorModel cm)

public int rgbToPixel (int rgb, ColorModel cm)