|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Graphics
java.awt.Graphics2D
javax.media.jai.GraphicsJAI
public class GraphicsJAI
A JAI wrapper for a Graphics2D object derived from a Component. When drawing JAI images to a Component such as a Canvas, a new GraphicsJAI may be constructed to wrap the Graphics2D object provided by that Component. This GraphicsJAI object may provide acceleration for calls to drawRenderedImage(), drawRenderableImage(), and possibly other methods.
If it is possible to use a CanvasJAI object instead of a generic Canvas, or other Canvas subclass, then the Graphics objects obtained from getGraphics() or received as an argument in paint() will automatically be instances of GraphicsJAI.
The portion of the GraphicsJAI
interface that
deals with adding and retrieving new hardware-specific implementations
has not been finalized and does not appear in the current API.
CanvasJAI
Constructor Summary | |
---|---|
protected |
GraphicsJAI(Graphics2D g,
Component component)
Constructs a new instance of GraphicsJAI that
wraps a given instance of Graphics2D for drawing
to a given Component . |
Method Summary | |
---|---|
void |
addRenderingHints(Map hints)
See comments in java.awt.Graphics2D. |
void |
clearRect(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
clip(Shape s)
See comments in java.awt.Graphics2D. |
void |
clipRect(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
See comments in java.awt.Graphics. |
Graphics |
create()
Creates a new GraphicsJAI object that is
a copy of this GraphicsJAI object. |
static GraphicsJAI |
createGraphicsJAI(Graphics2D g,
Component component)
Returns an instance of GraphicsJAI suitable
for rendering to the given Component via the
given Graphics2D instance. |
void |
dispose()
See comments in java.awt.Graphics. |
void |
draw(Shape s)
See comments in java.awt.Graphics2D. |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
See comments in java.awt.Graphics. |
void |
drawGlyphVector(GlyphVector g,
float x,
float y)
See comments in java.awt.Graphics2D. |
void |
drawImage(BufferedImage img,
BufferedImageOp op,
int x,
int y)
See comments in java.awt.Graphics2D. |
boolean |
drawImage(Image img,
AffineTransform xform,
ImageObserver obs)
See comments in java.awt.Graphics2D. |
boolean |
drawImage(Image img,
int x,
int y,
Color bgcolor,
ImageObserver observer)
See comments in java.awt.Graphics. |
boolean |
drawImage(Image img,
int x,
int y,
ImageObserver observer)
See comments in java.awt.Graphics. |
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver observer)
See comments in java.awt.Graphics. |
boolean |
drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver observer)
See comments in java.awt.Graphics. |
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver observer)
See comments in java.awt.Graphics. |
boolean |
drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
ImageObserver observer)
See comments in java.awt.Graphics. |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
See comments in java.awt.Graphics. |
void |
drawOval(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
See comments in java.awt.Graphics. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
See comments in java.awt.Graphics. |
void |
drawRenderableImage(RenderableImage img,
AffineTransform xform)
See comments in java.awt.Graphics2D. |
void |
drawRenderedImage(RenderedImage img,
AffineTransform xform)
See comments in java.awt.Graphics2D. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
See comments in java.awt.Graphics. |
void |
drawString(AttributedCharacterIterator iterator,
float x,
float y)
See comments in java.awt.Graphics2D. |
void |
drawString(AttributedCharacterIterator iterator,
int x,
int y)
See comments in java.awt.Graphics2D. |
void |
drawString(String s,
float x,
float y)
See comments in java.awt.Graphics2D. |
void |
drawString(String str,
int x,
int y)
See comments in java.awt.Graphics2D. |
void |
fill(Shape s)
See comments in java.awt.Graphics2D. |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
See comments in java.awt.Graphics. |
void |
fillOval(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
See comments in java.awt.Graphics. |
void |
fillRect(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
See comments in java.awt.Graphics. |
Color |
getBackground()
See comments in java.awt.Graphics2D. |
Shape |
getClip()
See comments in java.awt.Graphics. |
Rectangle |
getClipBounds()
See comments in java.awt.Graphics. |
Color |
getColor()
See comments in java.awt.Graphics. |
Composite |
getComposite()
See comments in java.awt.Graphics2D. |
GraphicsConfiguration |
getDeviceConfiguration()
See comments in java.awt.Graphics2D. |
Font |
getFont()
See comments in java.awt.Graphics. |
FontMetrics |
getFontMetrics(Font f)
See comments in java.awt.Graphics. |
FontRenderContext |
getFontRenderContext()
See comments in java.awt.Graphics2D. |
Paint |
getPaint()
See comments in java.awt.Graphics2D. |
Object |
getRenderingHint(RenderingHints.Key hintKey)
See comments in java.awt.Graphics2D. |
RenderingHints |
getRenderingHints()
See comments in java.awt.Graphics2D. |
Stroke |
getStroke()
See comments in java.awt.Graphics2D. |
AffineTransform |
getTransform()
See comments in java.awt.Graphics2D. |
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke)
See comments in java.awt.Graphics2D. |
void |
rotate(double theta)
See comments in java.awt.Graphics2D. |
void |
rotate(double theta,
double x,
double y)
See comments in java.awt.Graphics2D. |
void |
scale(double sx,
double sy)
See comments in java.awt.Graphics2D. |
void |
setBackground(Color color)
See comments in java.awt.Graphics2D. |
void |
setClip(int x,
int y,
int width,
int height)
See comments in java.awt.Graphics. |
void |
setClip(Shape clip)
See comments in java.awt.Graphics. |
void |
setColor(Color c)
See comments in java.awt.Graphics. |
void |
setComposite(Composite comp)
See comments in java.awt.Graphics2D. |
void |
setFont(Font font)
See comments in java.awt.Graphics. |
void |
setPaint(Paint paint)
See comments in java.awt.Graphics2D. |
void |
setPaintMode()
See comments in java.awt.Graphics. |
void |
setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
See comments in java.awt.Graphics2D. |
void |
setRenderingHints(Map hints)
See comments in java.awt.Graphics2D. |
void |
setStroke(Stroke s)
See comments in java.awt.Graphics2D. |
void |
setTransform(AffineTransform Tx)
See comments in java.awt.Graphics2D. |
void |
setXORMode(Color c1)
See comments in java.awt.Graphics. |
void |
shear(double shx,
double shy)
See comments in java.awt.Graphics2D. |
void |
transform(AffineTransform Tx)
See comments in java.awt.Graphics2D. |
void |
translate(double tx,
double ty)
See comments in java.awt.Graphics2D. |
void |
translate(int x,
int y)
See comments in java.awt.Graphics2D. |
Methods inherited from class java.awt.Graphics2D |
---|
draw3DRect, fill3DRect |
Methods inherited from class java.awt.Graphics |
---|
create, drawBytes, drawChars, drawPolygon, drawRect, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected GraphicsJAI(Graphics2D g, Component component)
GraphicsJAI
that
wraps a given instance of Graphics2D
for drawing
to a given Component
.
Method Detail |
---|
public static GraphicsJAI createGraphicsJAI(Graphics2D g, Component component)
GraphicsJAI
suitable
for rendering to the given Component
via the
given Graphics2D
instance.
If one is available, his method will select a hardware-specific implementation, that is specialized for the display device containing the component.
public Graphics create()
GraphicsJAI
object that is
a copy of this GraphicsJAI
object.
create
in class Graphics
Graphics.create()
public Color getColor()
getColor
in class Graphics
Graphics.getColor()
public void setColor(Color c)
setColor
in class Graphics
Graphics.setColor(Color)
public void setPaintMode()
setPaintMode
in class Graphics
Graphics.setPaintMode()
public void setXORMode(Color c1)
setXORMode
in class Graphics
Graphics.setXORMode(Color)
public Font getFont()
getFont
in class Graphics
Graphics.getFont()
public void setFont(Font font)
setFont
in class Graphics
Graphics.setFont(Font)
public FontMetrics getFontMetrics(Font f)
getFontMetrics
in class Graphics
Graphics.getFontMetrics(Font)
public Rectangle getClipBounds()
getClipBounds
in class Graphics
Graphics.getClipBounds()
public void clipRect(int x, int y, int width, int height)
clipRect
in class Graphics
Graphics.clipRect(int, int, int, int)
public void setClip(int x, int y, int width, int height)
setClip
in class Graphics
Graphics.setClip(int, int, int, int)
public Shape getClip()
getClip
in class Graphics
Graphics.getClip()
public void setClip(Shape clip)
setClip
in class Graphics
Graphics.setClip(Shape)
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class Graphics
Graphics.copyArea(int, int, int, int, int, int)
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class Graphics
Graphics.drawLine(int, int, int, int)
public void fillRect(int x, int y, int width, int height)
fillRect
in class Graphics
Graphics.fillRect(int, int, int, int)
public void clearRect(int x, int y, int width, int height)
clearRect
in class Graphics
Graphics.clearRect(int, int, int, int)
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class Graphics
Graphics.drawRoundRect(int, int, int, int, int, int)
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class Graphics
Graphics.fillRoundRect(int, int, int, int, int, int)
public void drawOval(int x, int y, int width, int height)
drawOval
in class Graphics
Graphics.drawOval(int, int, int, int)
public void fillOval(int x, int y, int width, int height)
fillOval
in class Graphics
Graphics.fillOval(int, int, int, int)
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class Graphics
Graphics.drawArc(int, int, int, int, int, int)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class Graphics
Graphics.fillArc(int, int, int, int, int, int)
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class Graphics
Graphics.drawPolyline(int[], int[], int)
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class Graphics
Graphics.drawPolygon(int[], int[], int)
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class Graphics
Graphics.fillPolygon(int[], int[], int)
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, ImageObserver)
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, int, int, ImageObserver)
public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, Color, ImageObserver)
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, int, int, Color, ImageObserver)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
drawImage
in class Graphics
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver)
public void dispose()
dispose
in class Graphics
Graphics.dispose()
public void draw(Shape s)
draw
in class Graphics2D
Graphics2D.draw(Shape)
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
drawImage
in class Graphics2D
Graphics2D.drawImage(Image, AffineTransform, ImageObserver)
public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
drawImage
in class Graphics2D
Graphics2D.drawImage(BufferedImage, BufferedImageOp, int, int)
public void drawRenderedImage(RenderedImage img, AffineTransform xform)
drawRenderedImage
in class Graphics2D
Graphics2D.drawRenderedImage(RenderedImage, AffineTransform)
public void drawRenderableImage(RenderableImage img, AffineTransform xform)
drawRenderableImage
in class Graphics2D
Graphics2D.drawRenderableImage(RenderableImage, AffineTransform)
public void drawString(String str, int x, int y)
drawString
in class Graphics2D
Graphics2D.drawString(String, int, int)
public void drawString(String s, float x, float y)
drawString
in class Graphics2D
Graphics2D.drawString(String, float, float)
public void drawString(AttributedCharacterIterator iterator, int x, int y)
drawString
in class Graphics2D
Graphics2D.drawString(AttributedCharacterIterator, int, int)
public void drawString(AttributedCharacterIterator iterator, float x, float y)
drawString
in class Graphics2D
Graphics2D.drawString(AttributedCharacterIterator, float, float)
public void drawGlyphVector(GlyphVector g, float x, float y)
drawGlyphVector
in class Graphics2D
Graphics2D.drawGlyphVector(GlyphVector, float, float)
public void fill(Shape s)
fill
in class Graphics2D
Graphics2D.fill(Shape)
public boolean hit(Rectangle rect, Shape s, boolean onStroke)
hit
in class Graphics2D
Graphics2D.hit(Rectangle, Shape, boolean)
public GraphicsConfiguration getDeviceConfiguration()
getDeviceConfiguration
in class Graphics2D
Graphics2D.getDeviceConfiguration()
public void setComposite(Composite comp)
setComposite
in class Graphics2D
Graphics2D.setComposite(Composite)
public void setPaint(Paint paint)
setPaint
in class Graphics2D
Graphics2D.setPaint(Paint)
public void setStroke(Stroke s)
setStroke
in class Graphics2D
Graphics2D.setStroke(Stroke)
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
setRenderingHint
in class Graphics2D
Graphics2D.setRenderingHint(RenderingHints.Key, Object)
public Object getRenderingHint(RenderingHints.Key hintKey)
getRenderingHint
in class Graphics2D
Graphics2D.getRenderingHint(RenderingHints.Key)
public void setRenderingHints(Map hints)
setRenderingHints
in class Graphics2D
Graphics2D.setRenderingHints(Map)
public void addRenderingHints(Map hints)
addRenderingHints
in class Graphics2D
Graphics2D.addRenderingHints(Map)
public RenderingHints getRenderingHints()
getRenderingHints
in class Graphics2D
Graphics2D.getRenderingHints()
public void translate(int x, int y)
translate
in class Graphics2D
Graphics2D.translate(int, int)
public void translate(double tx, double ty)
translate
in class Graphics2D
Graphics2D.translate(double, double)
public void rotate(double theta)
rotate
in class Graphics2D
Graphics2D.rotate(double)
public void rotate(double theta, double x, double y)
rotate
in class Graphics2D
Graphics2D.rotate(double, double, double)
public void scale(double sx, double sy)
scale
in class Graphics2D
Graphics2D.scale(double, double)
public void shear(double shx, double shy)
shear
in class Graphics2D
Graphics2D.shear(double, double)
public void transform(AffineTransform Tx)
transform
in class Graphics2D
Graphics2D.transform(AffineTransform)
public void setTransform(AffineTransform Tx)
setTransform
in class Graphics2D
Graphics2D.setTransform(AffineTransform)
public AffineTransform getTransform()
getTransform
in class Graphics2D
Graphics2D.getTransform()
public Paint getPaint()
getPaint
in class Graphics2D
Graphics2D.getPaint()
public Composite getComposite()
getComposite
in class Graphics2D
Graphics2D.getComposite()
public void setBackground(Color color)
setBackground
in class Graphics2D
Graphics2D.setBackground(Color)
public Color getBackground()
getBackground
in class Graphics2D
Graphics2D.getBackground()
public Stroke getStroke()
getStroke
in class Graphics2D
Graphics2D.getStroke()
public void clip(Shape s)
clip
in class Graphics2D
Graphics2D.clip(Shape)
public FontRenderContext getFontRenderContext()
getFontRenderContext
in class Graphics2D
Graphics2D.getFontRenderContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |