APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.java2d.loops

public abstract Class GraphicsPrimitive

extends Object
Class Inheritance
Known Direct Subclasses
sun.java2d.loops.GraphicsPrimitiveProxy, sun.java2d.loops.MaskBlit, sun.java2d.loops.MaskFill, sun.java2d.loops.ScaledBlit, sun.java2d.loops.TransformBlit, sun.java2d.loops.TransformHelper, sun.java2d.loops.Blit, sun.java2d.loops.BlitBg, sun.java2d.loops.DrawGlyphList, sun.java2d.loops.DrawGlyphListAA, sun.java2d.loops.DrawGlyphListColor, sun.java2d.loops.DrawGlyphListLCD, sun.java2d.loops.DrawLine, sun.java2d.loops.DrawParallelogram, sun.java2d.loops.DrawPath, sun.java2d.loops.DrawPolygons, sun.java2d.loops.DrawRect, sun.java2d.loops.FillParallelogram, sun.java2d.loops.FillPath, sun.java2d.loops.FillRect, sun.java2d.loops.FillSpans
Imports
java.awt.AlphaComposite, .Rectangle, java.awt.image.BufferedImage, java.io.FileNotFoundException, .FileOutputStream, .PrintStream, java.lang.reflect.Field, java.util.HashMap, .Map, .StringTokenizer, sun.awt.image.BufImgSurfaceData, sun.awt.util.ThreadGroupUtils, sun.java2d.SurfaceData, sun.java2d.pipe.Region

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static interface
protected static interface
public static class

Field Summary

Modifier and TypeField and Description
private String
private CompositeType
private SurfaceType
private String
methodSignature

INSTANCE DATA MEMBERS DESCRIBING CHARACTERISTICS OF THIS PRIMITIVE

private long
private SurfaceType
public static final int
public static String
public static int
public static final int
pack-priv static HashMap<Object, int[]>
public static PrintStream
public static final int
private int
private static int

Constructor Summary

AccessConstructor and Description
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.

Method Summary

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

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

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

protected static Blit
public final CompositeType
public final SurfaceType
protected static GraphicsPrimitive
getGeneralOp(int primID, CompositeType comptype)

public final long
public final int

Returns:

primitive ID
getPrimTypeID
()

Gets unique id for this GraphicsPrimitive type.

public final String
public final SurfaceType
private static PrintStream
public final int

Returns:

instance ID
getUniqueID
()

Gets instance ID of this graphics primitive.

protected GraphicsPrimitive
makePrimitive(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)

Produces specific primitive loop if the current object is registered as a general loop, otherwise the InternalError is thrown.

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

public final boolean
satisfies(String
The signature of the given operation. Must be == (not just .equals) the signature string given by the abstract class that declares the operation.
signature
,
SurfaceType
The surface type for the source of the operation
srctype
,
CompositeType
The composite type for the operation
comptype
,
SurfaceType
The surface type for the destination of the operation
dsttype
)

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

pack-priv final boolean
protected void
protected void
public static String
simplename(Field[] fields, Object o)

public static String
public static String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static synchronized void
public abstract GraphicsPrimitive
public static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cachednameback to summary
private String cachedname
compositeTypeback to summary
private CompositeType compositeType
destTypeback to summary
private SurfaceType destType
methodSignatureback to summary
private String methodSignature

INSTANCE DATA MEMBERS DESCRIBING CHARACTERISTICS OF THIS PRIMITIVE

pNativePrimback to summary
private long pNativePrim
sourceTypeback to summary
private SurfaceType sourceType
TRACECOUNTSback to summary
public static final int TRACECOUNTS
tracefileback to summary
public static String tracefile
traceflagsback to summary
public static int traceflags
TRACELOGback to summary
public static final int TRACELOG
traceMapback to summary
pack-priv static HashMap<Object, int[]> traceMap
traceoutback to summary
public static PrintStream traceout
TRACETIMESTAMPback to summary
public static final int TRACETIMESTAMP
uniqueIDback to summary
private int uniqueID
unusedPrimIDback to summary
private static int unusedPrimID

Constructor Detail

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

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

GraphicsPrimitiveback to summary
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.

Method Detail

convertFromback to summary
protected static SurfaceData convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData)
convertFromback to summary
protected static SurfaceData convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData, int type)
convertToback to summary
protected static void convertTo(Blit ob, SurfaceData srcImg, SurfaceData dstImg, Region clip, int dstX, int dstY, int w, int h)
createConverterback to summary
protected static Blit createConverter(SurfaceType srctype, SurfaceType dsttype)
getCompositeTypeback to summary
public final CompositeType getCompositeType()
getDestTypeback to summary
public final SurfaceType getDestType()
getGeneralOpback to summary
protected static GraphicsPrimitive getGeneralOp(int primID, CompositeType comptype)
getNativePrimback to summary
public final long getNativePrim()
getPrimTypeIDback to summary
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:int

primitive ID

getSignatureback to summary
public final String getSignature()
getSourceTypeback to summary
public final SurfaceType getSourceType()
getTraceOutputFileback to summary
private static PrintStream getTraceOutputFile()
getUniqueIDback to summary
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:int

instance ID

makePrimitiveback to summary
protected GraphicsPrimitive makePrimitive(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)

Produces specific primitive loop if the current object is registered as a general loop, otherwise the InternalError is thrown.

See Also
GraphicsPrimitiveMgr#registerGeneral
makePrimTypeIDback to summary
public static final synchronized int makePrimTypeID()
makeUniqueIDback to summary
public static final synchronized int makeUniqueID(int primTypeID, SurfaceType src, CompositeType cmp, SurfaceType dst)
satisfiesback to summary
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:String

The signature of the given operation. Must be == (not just .equals) the signature string given by the abstract class that declares the operation.

srctype:SurfaceType

The surface type for the source of the operation

comptype:CompositeType

The composite type for the operation

dsttype:SurfaceType

The surface type for the destination of the operation

satisfiesSameAsback to summary
pack-priv final boolean satisfiesSameAs(GraphicsPrimitive other)
setupGeneralBinaryOpback to summary
protected void setupGeneralBinaryOp(GraphicsPrimitive.GeneralBinaryOp gbo)
setupGeneralUnaryOpback to summary
protected void setupGeneralUnaryOp(GraphicsPrimitive.GeneralUnaryOp guo)
simplenameback to summary
public static String simplename(Field[] fields, Object o)
simplenameback to summary
public static String simplename(SurfaceType st)
simplenameback to summary
public static String simplename(CompositeType ct)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

tracePrimitiveback to summary
public static synchronized void tracePrimitive(Object prim)
traceWrapback to summary
public abstract GraphicsPrimitive traceWrap()
tracingEnabledback to summary
public static boolean tracingEnabled()
sun.java2d.loops back to summary

protected Interface GraphicsPrimitive.GeneralBinaryOp

Known Direct Implementers
sun.java2d.loops.MaskBlit.General, sun.java2d.loops.Blit.GeneralXorBlit

Method Summary

Modifier and TypeMethod and Description
public CompositeType
public SurfaceType
public int
public String
public SurfaceType
getSourceType()

These 4 methods are implemented automatically for any GraphicsPrimitive.

public void
setPrimitives(Blit srcconverter, Blit dstconverter, GraphicsPrimitive genericop, Blit resconverter)

This method allows the setupGeneralBinaryOp method to set the converters into the General version of the Primitive.

Method Detail

getCompositeTypeback to summary
public CompositeType getCompositeType()
getDestTypeback to summary
public SurfaceType getDestType()
getPrimTypeIDback to summary
public int getPrimTypeID()
getSignatureback to summary
public String getSignature()
getSourceTypeback to summary
public SurfaceType getSourceType()

These 4 methods are implemented automatically for any GraphicsPrimitive. They are used by setupGeneralBinaryOp to retrieve the information needed to find the right converter primitives.

setPrimitivesback to summary
public void setPrimitives(Blit srcconverter, Blit dstconverter, GraphicsPrimitive genericop, Blit resconverter)

This method allows the setupGeneralBinaryOp method to set the converters into the General version of the Primitive.

sun.java2d.loops back to summary

protected Interface GraphicsPrimitive.GeneralUnaryOp


Method Summary

Modifier and TypeMethod and Description
public CompositeType
getCompositeType()

These 3 methods are implemented automatically for any GraphicsPrimitive.

public SurfaceType
public int
public String
public void
setPrimitives(Blit dstconverter, GraphicsPrimitive genericop, Blit resconverter)

This method allows the setupGeneralUnaryOp method to set the converters into the General version of the Primitive.

Method Detail

getCompositeTypeback to summary
public CompositeType getCompositeType()

These 3 methods are implemented automatically for any GraphicsPrimitive. They are used by setupGeneralUnaryOp to retrieve the information needed to find the right converter primitives.

getDestTypeback to summary
public SurfaceType getDestType()
getPrimTypeIDback to summary
public int getPrimTypeID()
getSignatureback to summary
public String getSignature()
setPrimitivesback to summary
public void setPrimitives(Blit dstconverter, GraphicsPrimitive genericop, Blit resconverter)

This method allows the setupGeneralUnaryOp method to set the converters into the General version of the Primitive.

sun.java2d.loops back to summary

public Class GraphicsPrimitive.TraceReporter

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TraceReporterback to summary
public TraceReporter()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

setShutdownHookback to summary
public static void setShutdownHook()