java.lang.Object | |
↳ | sun.java2d.loops.CompositeType |
A CompositeType object provides a chained description of a type of algorithm for color compositing. The object will provide a single String constant descriptor which is one way of describing a particular compositing algorithm as well as a pointer to another CompositeType which describes a more general algorithm for achieving the same result.
A description of a more specific algorithm is considered a "subtype" and a description of a more general algorithm is considered a "supertype". Thus, the deriveSubType method provides a way to create a new CompositeType that is related to but more specific than an existing CompositeType and the getSuperType method provides a way to ask a given CompositeType for a more general algorithm to achieve the same result.
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 algorithm if all of the more specific searches fail.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DESC_ALPHA_XOR | ||||||||||
String | DESC_ANY | algorithm is a general algorithm that uses a CompositeContext to do the rendering. | |||||||||
String | DESC_ANY_ALPHA | constant used to describe an algorithm that implements all 8 of the Porter-Duff rules in one Primitive. | |||||||||
String | DESC_CLEAR | constants used to describe the various AlphaComposite algorithms. | |||||||||
String | DESC_DST | ||||||||||
String | DESC_DST_ATOP | ||||||||||
String | DESC_DST_IN | ||||||||||
String | DESC_DST_OUT | ||||||||||
String | DESC_DST_OVER | ||||||||||
String | DESC_SRC | ||||||||||
String | DESC_SRC_ATOP | ||||||||||
String | DESC_SRC_IN | ||||||||||
String | DESC_SRC_NO_EA | constants used to describe the two common cases of AlphaComposite algorithms that are simpler if there is not extraAlpha. | |||||||||
String | DESC_SRC_OUT | ||||||||||
String | DESC_SRC_OVER | ||||||||||
String | DESC_SRC_OVER_NO_EA | ||||||||||
String | DESC_XOR | constant used to describe the Graphics.setXORMode() algorithm |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AlphaXor | |||||||||||
Any | The root CompositeType object for all chains of algorithm descriptions. | ||||||||||
AnyAlpha | |||||||||||
Clear | |||||||||||
Dst | |||||||||||
DstAtop | |||||||||||
DstIn | |||||||||||
DstOut | |||||||||||
DstOver | |||||||||||
General | |||||||||||
Src | |||||||||||
SrcAtop | |||||||||||
SrcIn | |||||||||||
SrcNoEa | |||||||||||
SrcOut | |||||||||||
SrcOver | |||||||||||
SrcOverNoEa | |||||||||||
Xor |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a new CompositeType object which uses this object as its
more general "supertype" descriptor.
| |||||||||||
Indicates whether some other object is "equal to" this one.
| |||||||||||
Return a CompositeType object for the specified AlphaComposite
rule.
| |||||||||||
Returns a hash code value for the object.
| |||||||||||
Returns a string representation of the object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
algorithm is a general algorithm that uses a CompositeContext to do the rendering.
constant used to describe an algorithm that implements all 8 of the Porter-Duff rules in one Primitive.
constants used to describe the various AlphaComposite algorithms.
constants used to describe the two common cases of AlphaComposite algorithms that are simpler if there is not extraAlpha.
constant used to describe the Graphics.setXORMode() algorithm
The root CompositeType object for all chains of algorithm descriptions.
Return a new CompositeType object which uses this object as its more general "supertype" descriptor. If no operation can be found that implements the algorithm described more exactly by desc, then this object will define the more general compositing algorithm that can be used instead.
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.Return a CompositeType object for the specified AlphaComposite rule.
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())