java.lang.Object | |
↳ | sun.java2d.loops.SurfaceType |
A SurfaceType object provides a chained description of a type of drawing surface. The object will provide a single String constant descriptor which is one way of viewing or accessing a particular drawing surface as well as a pointer to another SurfaceType which describes the same drawing surface in a different (typically more generalized) way.
A more specific description of a surface is considered a "subtype" and a more general description is considered a "supertype". Thus, the deriveSubType method provides a way to create a new SurfaceType that is related to but more specific than an existing SurfaceType and the getSuperType method provides a way to ask a given SurfaceType for a more general way to describe the same surface.
Note that you cannot construct a brand new root for a chain since the constructor is private. Every chain of types must at some point derive from the Any node provided here using the deriveSubType() method. The presence of this common Any node on every chain ensures that all chains end with the DESC_ANY descriptor so that a suitable General GraphicsPrimitive object can be obtained for the indicated surface if all of the more specific searches fail.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DESC_3BYTE_BGR | ||||||||||
String | DESC_3BYTE_RGB | additional 3 byte format common on Windows | |||||||||
String | DESC_4BYTE_ABGR | ||||||||||
String | DESC_4BYTE_ABGR_PRE | ||||||||||
String | DESC_ANY | surface is unknown color model or sample model. | |||||||||
String | DESC_ANY_3BYTE | wildcard format which indicates that the GraphicsPrimitive operates on a surface with 3 component interleaved Raster and sample model and a ComponentColorModel with an arbitrary ordering of the RGB channels | |||||||||
String | DESC_ANY_4BYTE | wildcard format which indicates that the GraphicsPrimitive operates on a surface with 4 component interleaved Raster and sample model and a ComponentColorModel with an arbitrary ordering of the ARGB channels | |||||||||
String | DESC_ANY_BYTE | wildcard format which indicates that the GraphicsPrimitive is independent of the color model on a ByteComponent sample model surface | |||||||||
String | DESC_ANY_COLOR | ||||||||||
String | DESC_ANY_INT | wildcard format which indicates that the GraphicsPrimitive is independent of the color model on an IntegerComponent sample model surface | |||||||||
String | DESC_ANY_INT_DCM | wildcard format which indicates that the GraphicsPrimitive operates on a surface with a single component IntegerComponent sample model and a DirectColorModel with an arbitrary ordering of the RGB channels | |||||||||
String | DESC_ANY_PAINT | Special type for describing the sources of loops that render the current foreground color or paint instead of copying colors from a source surface. | |||||||||
String | DESC_ANY_SHORT | wildcard format which indicates that the GraphicsPrimitive is independent of the color model on a ShortComponent sample model surface | |||||||||
String | DESC_BYTE_BINARY | ||||||||||
String | DESC_BYTE_BINARY_1BIT | ||||||||||
String | DESC_BYTE_BINARY_2BIT | ||||||||||
String | DESC_BYTE_BINARY_4BIT | ||||||||||
String | DESC_BYTE_GRAY | ||||||||||
String | DESC_BYTE_INDEXED | ||||||||||
String | DESC_BYTE_INDEXED_BM | ||||||||||
String | DESC_BYTE_INDEXED_OPAQUE | Opaque 8-bit indexed images | |||||||||
String | DESC_GRADIENT_PAINT | ||||||||||
String | DESC_INDEX12_GRAY | ||||||||||
String | DESC_INDEX8_GRAY | Special Gray Scale types for rendering loops. | |||||||||
String | DESC_INT_ARGB | ||||||||||
String | DESC_INT_ARGB_BM | common formats for BITMASK transparency. | |||||||||
String | DESC_INT_ARGB_PRE | ||||||||||
String | DESC_INT_BGR | ||||||||||
String | DESC_INT_BGRx | ||||||||||
String | DESC_INT_RGB | common surface formats defined in BufferedImage | |||||||||
String | DESC_INT_RGBx | additional IntegerComponent types common on Windows | |||||||||
String | DESC_LINEAR_GRADIENT_PAINT | ||||||||||
String | DESC_OPAQUE_COLOR | ||||||||||
String | DESC_OPAQUE_GRADIENT_PAINT | ||||||||||
String | DESC_OPAQUE_LINEAR_GRADIENT_PAINT | ||||||||||
String | DESC_OPAQUE_RADIAL_GRADIENT_PAINT | ||||||||||
String | DESC_OPAQUE_TEXTURE_PAINT | ||||||||||
String | DESC_RADIAL_GRADIENT_PAINT | ||||||||||
String | DESC_TEXTURE_PAINT | ||||||||||
String | DESC_USHORT_4444_ARGB | ||||||||||
String | DESC_USHORT_555_RGB | ||||||||||
String | DESC_USHORT_555_RGBx | ||||||||||
String | DESC_USHORT_565_RGB | ||||||||||
String | DESC_USHORT_GRAY | ||||||||||
String | DESC_USHORT_INDEXED |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Any | The root SurfaceType object for all chains of surface descriptions. | ||||||||||
Any3Byte | |||||||||||
Any4Byte | |||||||||||
AnyByte | |||||||||||
AnyByteBinary | |||||||||||
AnyColor | |||||||||||
AnyDcm | |||||||||||
AnyInt | |||||||||||
AnyPaint | |||||||||||
AnyShort | |||||||||||
ByteBinary1Bit | |||||||||||
ByteBinary2Bit | |||||||||||
ByteBinary4Bit | |||||||||||
ByteGray | |||||||||||
ByteIndexed | |||||||||||
ByteIndexedBm | |||||||||||
ByteIndexedOpaque | |||||||||||
Custom | |||||||||||
FourByteAbgr | |||||||||||
FourByteAbgrPre | |||||||||||
GradientPaint | |||||||||||
Index12Gray | |||||||||||
Index8Gray | |||||||||||
IntArgb | |||||||||||
IntArgbBm | |||||||||||
IntArgbPre | |||||||||||
IntBgr | |||||||||||
IntBgrx | |||||||||||
IntRgb | |||||||||||
IntRgbx | |||||||||||
LinearGradientPaint | |||||||||||
OpaqueColor | |||||||||||
OpaqueGradientPaint | |||||||||||
OpaqueLinearGradientPaint | |||||||||||
OpaqueRadialGradientPaint | |||||||||||
OpaqueTexturePaint | |||||||||||
RadialGradientPaint | |||||||||||
TexturePaint | |||||||||||
ThreeByteBgr | |||||||||||
ThreeByteRgb | |||||||||||
Ushort4444Argb | |||||||||||
Ushort555Rgb | |||||||||||
Ushort555Rgbx | |||||||||||
Ushort565Rgb | |||||||||||
UshortGray | |||||||||||
UshortIndexed | |||||||||||
pixelConverter |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a new SurfaceType object which uses this object as its
more general "supertype" descriptor.
| |||||||||||
Indicates whether some other object is "equal to" this one.
| |||||||||||
Returns a hash code value for the object.
| |||||||||||
Returns a string representation of the object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
additional 3 byte format common on Windows
surface is unknown color model or sample model.
wildcard format which indicates that the GraphicsPrimitive operates on a surface with 3 component interleaved Raster and sample model and a ComponentColorModel with an arbitrary ordering of the RGB channels
wildcard format which indicates that the GraphicsPrimitive operates on a surface with 4 component interleaved Raster and sample model and a ComponentColorModel with an arbitrary ordering of the ARGB channels
wildcard format which indicates that the GraphicsPrimitive is independent of the color model on a ByteComponent sample model surface
wildcard format which indicates that the GraphicsPrimitive is independent of the color model on an IntegerComponent sample model surface
wildcard format which indicates that the GraphicsPrimitive operates on a surface with a single component IntegerComponent sample model and a DirectColorModel with an arbitrary ordering of the RGB channels
Special type for describing the sources of loops that render the current foreground color or paint instead of copying colors from a source surface.
wildcard format which indicates that the GraphicsPrimitive is independent of the color model on a ShortComponent sample model surface
Opaque 8-bit indexed images
Special Gray Scale types for rendering loops. Really indexed types, but colormap has all gray values.
common formats for BITMASK transparency.
common surface formats defined in BufferedImage
additional IntegerComponent types common on Windows
The root SurfaceType object for all chains of surface descriptions. The root uses the default PixelConverter object, which uses a given ColorModel object to calculate its pixelFor() values when asked. Any SurfaceType objects that are not created with a specific PixelConverter object will inherit this behavior from the root.
Return a new SurfaceType object which uses this object as its more general "supertype" descriptor. If no operation can be found that manipulates the type of surface described more exactly by desc, then this object will define the more relaxed specification of the surface that can be used to find a more general operator.
Indicates whether some other object is "equal to" this one.
The equals
method implements an equivalence relation
on non-null object references:
x
, x.equals(x)
should return
true
.
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
x
and y
, multiple invocations of
x.equals(y) consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
x
,
x.equals(null)
should return false
.
The equals method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
o | the reference object with which to compare. |
---|
true
if this object is the same as the obj
argument; false
otherwise.Returns a hash code value for the object. This method is
supported for the benefit of hashtables such as those provided by
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method on each of
the two objects must produce the same integer result.
equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())