public abstract class

GraphicsPrimitive

extends Object
java.lang.Object
   ↳ sun.java2d.loops.GraphicsPrimitive
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

defines interface for primitives which can be placed into the graphic component manager framework

Summary

Nested Classes
interface GraphicsPrimitive.GeneralBinaryOp  
interface GraphicsPrimitive.GeneralUnaryOp  
class GraphicsPrimitive.TraceReporter  
Constants
int TRACECOUNTS
int TRACELOG
int TRACETIMESTAMP
Fields
public static String tracefile
public static int traceflags
public static PrintStream traceout
Protected Constructors
GraphicsPrimitive(String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType)
Create a new GraphicsPrimitive with all of the required descriptive information.
GraphicsPrimitive(long pNativePrim, String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType)
Create a new GraphicsPrimitive for native invocation with all of the required descriptive information.
Public Methods
final CompositeType getCompositeType()
final SurfaceType getDestType()
final long getNativePrim()
final int getPrimTypeID()
Gets unique id for this GraphicsPrimitive type.
final String getSignature()
final SurfaceType getSourceType()
final int getUniqueID()
Gets instance ID of this graphics primitive.
synchronized final static int makePrimTypeID()
abstract GraphicsPrimitive makePrimitive(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
synchronized final static int makeUniqueID(int primTypeID, SurfaceType src, CompositeType cmp, SurfaceType dst)
final boolean satisfies(String signature, SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
Return true if this primitive can be used for the given signature surfaces, and composite.
static String simplename(Field[] fields, Object o)
static String simplename(CompositeType ct)
static String simplename(SurfaceType st)
String toString()
Returns a string representation of the object.
synchronized static void tracePrimitive(Object prim)
abstract GraphicsPrimitive traceWrap()
static boolean tracingEnabled()
Protected Methods
static SurfaceData convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData, int type)
static SurfaceData convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData)
static void convertTo(Blit ob, SurfaceData srcImg, SurfaceData dstImg, Region clip, int dstX, int dstY, int w, int h)
static Blit createConverter(SurfaceType srctype, SurfaceType dsttype)
static GraphicsPrimitive getGeneralOp(int primID, CompositeType comptype)
void setupGeneralBinaryOp(GraphicsPrimitive.GeneralBinaryOp gbo)
void setupGeneralUnaryOp(GraphicsPrimitive.GeneralUnaryOp guo)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int TRACECOUNTS

Constant Value: 4 (0x00000004)

public static final int TRACELOG

Constant Value: 1 (0x00000001)

public static final int TRACETIMESTAMP

Constant Value: 2 (0x00000002)

Fields

public static String tracefile

public static int traceflags

public static PrintStream traceout

Protected Constructors

protected GraphicsPrimitive (String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType)

Create a new GraphicsPrimitive with all of the required descriptive information.

protected GraphicsPrimitive (long pNativePrim, String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType)

Create a new GraphicsPrimitive for native invocation with all of the required descriptive information.

Public Methods

public final CompositeType getCompositeType ()

public final SurfaceType getDestType ()

public final long getNativePrim ()

public final int getPrimTypeID ()

Gets unique id for this GraphicsPrimitive type. This id is used to identify the TYPE of primitive (Blit vs. BlitBg) as opposed to INSTANCE of primitive.

Returns
  • primitive ID

public final String getSignature ()

public final SurfaceType getSourceType ()

public final int getUniqueID ()

Gets instance ID of this graphics primitive. Instance ID is comprised of four distinct ids (ORed together) that uniquely identify each instance of a GraphicsPrimitive object. The four ids making up instance ID are: 1. primitive id - identifier shared by all primitives of the same type (eg. all Blits have the same primitive id) 2. sourcetype id - identifies source surface type 3. desttype id - identifies destination surface type 4. compositetype id - identifies composite used

Returns
  • instance ID

public static final synchronized int makePrimTypeID ()

public abstract GraphicsPrimitive makePrimitive (SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)

public static final synchronized int makeUniqueID (int primTypeID, SurfaceType src, CompositeType cmp, SurfaceType dst)

public final boolean satisfies (String signature, SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)

Return true if this primitive can be used for the given signature surfaces, and composite.

Parameters
signature The signature of the given operation. Must be == (not just .equals) the signature string given by the abstract class that declares the operation.
srctype The surface type for the source of the operation
comptype The composite type for the operation
dsttype The surface type for the destination of the operation

public static String simplename (Field[] fields, Object o)

public static String simplename (CompositeType ct)

public static String simplename (SurfaceType st)

public String toString ()

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())
 

Returns
  • a string representation of the object.

public static synchronized void tracePrimitive (Object prim)

public abstract GraphicsPrimitive traceWrap ()

public static boolean tracingEnabled ()

Protected Methods

protected static SurfaceData convertFrom (Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData, int type)

protected static SurfaceData convertFrom (Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData)

protected static void convertTo (Blit ob, SurfaceData srcImg, SurfaceData dstImg, Region clip, int dstX, int dstY, int w, int h)

protected static Blit createConverter (SurfaceType srctype, SurfaceType dsttype)

protected static GraphicsPrimitive getGeneralOp (int primID, CompositeType comptype)

protected void setupGeneralBinaryOp (GraphicsPrimitive.GeneralBinaryOp gbo)

protected void setupGeneralUnaryOp (GraphicsPrimitive.GeneralUnaryOp guo)