Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.awt.Graphics
java.awt.Graphics2D
gnu.java.awt.peer.qt.QtGraphics
public abstract class QtGraphics
extends Graphics2D
Field Summary | |
protected Color | |
protected Shape | |
protected Color | |
protected Composite | |
protected double | |
protected Paint | |
protected Stroke | |
protected Font | |
protected Shape | |
protected long |
|
protected boolean | |
protected RenderingHints | |
protected AffineTransform |
Method Summary | |
void |
|
void |
|
void | |
void |
|
abstract void |
|
abstract Graphics |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Color |
|
Shape |
|
Rectangle |
|
Color |
|
Composite |
|
abstract GraphicsConfiguration | |
Font |
|
FontMetrics |
|
FontRenderContext |
|
Paint |
|
Object |
|
RenderingHints |
|
Stroke |
|
AffineTransform |
|
boolean | |
protected void | |
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void | |
void | |
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class java.awt.Graphics2D | |
addRenderingHints , clip , draw , draw3DRect , drawGlyphVector , drawImage , drawImage , drawRenderableImage , drawRenderedImage , drawString , drawString , drawString , drawString , fill , fill3DRect , getBackground , getComposite , getDeviceConfiguration , getFontRenderContext , getPaint , getRenderingHint , getRenderingHints , getStroke , getTransform , hit , rotate , rotate , scale , setBackground , setComposite , setPaint , setRenderingHint , setRenderingHints , setStroke , setTransform , shear , transform , translate , translate |
Methods inherited from class java.awt.Graphics | |
clearRect , clipRect , copyArea , create , create , dispose , draw3DRect , drawArc , drawBytes , drawChars , drawImage , drawImage , drawImage , drawImage , drawImage , drawImage , drawLine , drawOval , drawPolygon , drawPolygon , drawPolyline , drawRect , drawRoundRect , drawString , drawString , fill3DRect , fillArc , fillOval , fillPolygon , fillPolygon , fillRect , fillRoundRect , finalize , getClip , getClipBounds , getClipBounds , getClipRect , getColor , getFont , getFontMetrics , getFontMetrics , hitClip , setClip , setClip , setColor , setFont , setPaintMode , setXORMode , toString , translate |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void addRenderingHints(Map hints)
Adds/updates the rendering hint.
- Overrides:
- addRenderingHints in interface Graphics2D
- Parameters:
hints
- the hints to add or update.
public void clearRect(int x, int y, int width, int height)
Clears the specified rectangle.
- Parameters:
x
- The X coordinate of the upper left corner of the clear rect.y
- The Y coordinate of the upper left corner of the clear rect.width
- The width of the clear rect.height
- The height of the clear rect.
public void clip(Shape s)
Intersects the current clip with the shape
- Overrides:
- clip in interface Graphics2D
public void clipRect(int x, int y, int width, int height)
Sets the clipping region to the intersection of the current clipping region and the rectangle determined by the specified parameters.
- Parameters:
x
- The X coordinate of the upper left corner of the intersect rect.y
- The Y coordinate of the upper left corner of the intersect rect.width
- The width of the intersect rect.height
- The height of the intersect rect.
public abstract void copyArea(int x, int y, int width, int height, int dx, int dy)
Copies the specified rectangle to the specified offset location.
- Parameters:
x
- The X coordinate of the upper left corner of the copy rect.y
- The Y coordinate of the upper left corner of the copy rect.width
- The width of the copy rect.height
- The height of the copy rect.dx
- The offset from the X value to start drawing.dy
- The offset from the Y value to start drawing.
public void dispose()
Free any resources held by this graphics context immediately instead of waiting for the object to be garbage collected and finalized.
public void draw(Shape s)
Draws an outline around a shape using the current stroke and paint.
- Overrides:
- draw in interface Graphics2D
- Parameters:
- See Also:
Graphics2D.getStroke()
,Graphics2D.getPaint()
public void draw3DRect(int x, int y, int width, int height, boolean raised)
- Overrides:
- draw3DRect in interface Graphics2D
public void drawArc(int x, int y, int width, int height, int arcStart, int arcAngle)
Draws an arc using the specified bounding rectangle and the specified angle parameter. The arc is centered at the center of the rectangle. The arc starts at the arcAngle position and extend for arcAngle degrees. The degree origin is at the 3 o'clock position.
- Parameters:
x
- The X coordinate of the upper left corner of the rect.y
- The Y coordinate of the upper left corner of the rect.width
- The width of the rect.height
- The height of the rect.arcStart
- The beginning angle of the arc.arcAngle
- The extent of the arc.
public void drawGlyphVector(GlyphVector v, float x, float y)
Draws a glyph vector at the specified location.
- Overrides:
- drawGlyphVector in interface Graphics2D
- Parameters:
x
- the x-coordinate.y
- the y-coordinate.
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
FIXME: Write Javadocs for this when you understand it.
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
FIXME: Write Javadocs for this when you understand it.
public boolean drawImage(Image image, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
Draws all of the image that is available and returns. The image is scaled to fit in the specified rectangle. If the image is not completely loaded,false
is returned and the specified iamge observer is notified as more data becomes available.
- Parameters:
image
- The image to draw.x
- The X coordinate of the point to draw at.y
- The Y coordinate of the point to draw at.width
- The width of the rectangle to draw in.height
- The height of the rectangle to draw in.bgcolor
- The background color to use for the image.observer
- The image observer to notify as data becomes available.
- Returns:
true
if all the image data is available,false
otherwise.
public boolean drawImage(Image image, int x, int y, int width, int height, ImageObserver observer)
Draws all of the image that is available and returns. The image is scaled to fit in the specified rectangle. If the image is not completely loaded,false
is returned and the specified iamge observer is notified as more data becomes available.
- Parameters:
image
- The image to draw.x
- The X coordinate of the point to draw at.y
- The Y coordinate of the point to draw at.width
- The width of the rectangle to draw in.height
- The height of the rectangle to draw in.observer
- The image observer to notify as data becomes available.
- Returns:
true
if all the image data is available,false
otherwise.
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer)
Draws all of the image that is available and returns. If the image is not completely loaded,false
is returned and the specified iamge observer is notified as more data becomes available.
- Parameters:
image
- The image to draw.x
- The X coordinate of the point to draw at.y
- The Y coordinate of the point to draw at.bgcolor
- The background color to use for the image.observer
- The image observer to notify as data becomes available.
- Returns:
true
if all the image data is available,false
otherwise.
public boolean drawImage(Image image, int x, int y, ImageObserver observer)
Draws all of the image that is available and returns. If the image is not completely loaded,false
is returned and the specified iamge observer is notified as more data becomes available.
- Parameters:
image
- The image to draw.x
- The X coordinate of the point to draw at.y
- The Y coordinate of the point to draw at.observer
- The image observer to notify as data becomes available.
- Returns:
true
if all the image data is available,false
otherwise.
public boolean drawImage(Image image, AffineTransform Tx, ImageObserver obs)
- Overrides:
- drawImage in interface Graphics2D
public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
- Overrides:
- drawImage in interface Graphics2D
public void drawLine(int x1, int y1, int x2, int y2)
Draws a line between the two specified points.
- Parameters:
x1
- The X coordinate of the first point.y1
- The Y coordinate of the first point.x2
- The X coordinate of the second point.y2
- The Y coordinate of the second point.
public void drawOval(int x, int y, int width, int height)
Draws an oval that just fits within the specified rectangle.
- Parameters:
x
- The X coordinate of the upper left corner of the rect.y
- The Y coordinate of the upper left corner of the rect.width
- The width of the rect.height
- The height of the rect.
public void drawPolygon(xPoints[] , yPoints[] , int npoints)
Draws a series of interconnected lines determined by the arrays of corresponding x and y coordinates. The figure is closed if necessary by connecting the first and last points.
- Overrides:
- drawPolygon in interface Graphics
- Parameters:
npoints
- The number of points to draw.
public void drawPolyline(xPoints[] , yPoints[] , int npoints)
Draws a series of interconnected lines determined by the arrays of corresponding x and y coordinates.
- Overrides:
- drawPolyline in interface Graphics
- Parameters:
npoints
- The number of points to draw.
public void drawRect(int x, int y, int width, int height)
Draws the outline of the specified rectangle.
- Parameters:
x
- The X coordinate of the upper left corner of the draw rect.y
- The Y coordinate of the upper left corner of the draw rect.width
- The width of the draw rect.height
- The height of the draw rect.
public void drawRenderableImage(RenderableImage image, AffineTransform xform)
- Overrides:
- drawRenderableImage in interface Graphics2D
public void drawRenderedImage(RenderedImage image, AffineTransform xform)
- Overrides:
- drawRenderedImage in interface Graphics2D
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Draws the outline of the specified rectangle with rounded cornders.
- Overrides:
- drawRoundRect in interface Graphics
- Parameters:
x
- The X coordinate of the upper left corner of the draw rect.y
- The Y coordinate of the upper left corner of the draw rect.width
- The width of the draw rect.height
- The height of the draw rect.arcWidth
- The width of the corner arcs.arcHeight
- The height of the corner arcs.
public void drawString(String string, float x, float y)
Draws a string at the specified location, using the current font.
- Overrides:
- drawString in interface Graphics2D
- Parameters:
x
- the x-coordinate.y
- the y-coordinate.
- See Also:
Graphics.setFont(Font)
public void drawString(String string, int x, int y)
Draws a string at the specified location, using the current font.
- Overrides:
- drawString in interface Graphics2D
- Parameters:
x
- the x-coordinate.y
- the y-coordinate.
- See Also:
Graphics.setFont(Font)
public void drawString(AttributedCharacterIterator ci, float x, float y)
Draws an attributed string at the specified location.
- Overrides:
- drawString in interface Graphics2D
- Parameters:
x
- the x-coordinate.y
- the y-coordinate.
public void drawString(AttributedCharacterIterator ci, int x, int y)
Draws an attributed string at the specified location.
- Overrides:
- drawString in interface Graphics2D
- Parameters:
x
- the x-coordinate.y
- the y-coordinate.
public void fill(Shape s)
Fills the interior of the specifiedshape
using the current paint.
- Overrides:
- fill in interface Graphics2D
- Parameters:
- See Also:
Graphics2D.draw(Shape)
,Graphics2D.getPaint()
public void fill3DRect(int x, int y, int width, int height, boolean raised)
Fills the specified rectangle with a 3D effect
- Overrides:
- fill3DRect in interface Graphics2D
- Parameters:
x
- The X coordinate of the upper left corner of the fill rect.y
- The Y coordinate of the upper left corner of the fill rect.width
- The width of the fill rect.height
- The height of the fill rect.raised
-true
if the rectangle appears raised,false
if it should appear etched.
public void fillArc(int x, int y, int width, int height, int arcStart, int arcAngle)
Fills the arc define by the specified bounding rectangle and the specified angle parameter. The arc is centered at the center of the rectangle. The arc starts at the arcAngle position and extend for arcAngle degrees. The degree origin is at the 3 o'clock position.
- Parameters:
x
- The X coordinate of the upper left corner of the rect.y
- The Y coordinate of the upper left corner of the rect.width
- The width of the rect.height
- The height of the rect.arcStart
- The beginning angle of the arc.arcAngle
- The extent of the arc.
public void fillOval(int x, int y, int width, int height)
Fills an oval that just fits within the specified rectangle.
- Parameters:
x
- The X coordinate of the upper left corner of the rect.y
- The Y coordinate of the upper left corner of the rect.width
- The width of the rect.height
- The height of the rect.
public void fillPolygon(xPoints[] , yPoints[] , int npoints)
Fills the polygon determined by the arrays of corresponding x and y coordinates.
- Overrides:
- fillPolygon in interface Graphics
- Parameters:
npoints
- The number of points to draw.
public void fillRect(int x, int y, int width, int height)
Fills the area bounded by the specified rectangle.
- Parameters:
x
- The X coordinate of the upper left corner of the fill rect.y
- The Y coordinate of the upper left corner of the fill rect.width
- The width of the fill rect.height
- The height of the fill rect.
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Fills the specified rectangle with rounded cornders.
- Overrides:
- fillRoundRect in interface Graphics
- Parameters:
x
- The X coordinate of the upper left corner of the fill rect.y
- The Y coordinate of the upper left corner of the fill rect.width
- The width of the fill rect.height
- The height of the fill rect.arcWidth
- The width of the corner arcs.arcHeight
- The height of the corner arcs.
public Color getBackground()
Returns the color used by theGraphics.clearRect(int,int,int,int)
method.
- Overrides:
- getBackground in interface Graphics2D
- Returns:
- The background color.
- See Also:
Graphics2D.setBackground(Color)
public Shape getClip()
Returns the current clipping region as aShape
object.
- Returns:
- The clipping region as a
Shape
.
public Rectangle getClipBounds()
Returns the bounding rectangle of the clipping region for this graphics context.
- Overrides:
- getClipBounds in interface Graphics
- Returns:
- The bounding rectangle for the clipping region.
public Color getColor()
Returns the current color for this object.
- Returns:
- The color for this object.
public Composite getComposite()
Returns the current compositing rule.
- Overrides:
- getComposite in interface Graphics2D
- Returns:
- The current compositing rule.
- See Also:
Graphics2D.setComposite(Composite)
public abstract GraphicsConfiguration getDeviceConfiguration()
- Overrides:
- getDeviceConfiguration in interface Graphics2D
public Font getFont()
Returns the current font for this graphics context.
- Returns:
- The current font.
public FontMetrics getFontMetrics(Font font)
Returns the font metrics for the specified font.
- Overrides:
- getFontMetrics in interface Graphics
- Parameters:
font
- The font to return metrics for.
- Returns:
- The requested font metrics.
public FontRenderContext getFontRenderContext()
Returns the font render context.
- Overrides:
- getFontRenderContext in interface Graphics2D
- Returns:
- The font render context.
public Paint getPaint()
Returns the current paint.
- Overrides:
- getPaint in interface Graphics2D
- Returns:
- The current paint.
- See Also:
Graphics2D.setPaint(Paint)
public Object getRenderingHint(RenderingHints.Key hintKey)
Returns the current value of a rendering hint.
- Overrides:
- getRenderingHint in interface Graphics2D
- Parameters:
hintKey
- the key for the hint.
- Returns:
- The value for the specified hint.
public RenderingHints getRenderingHints()
Returns the current rendering hints.
- Overrides:
- getRenderingHints in interface Graphics2D
- Returns:
- The current rendering hints.
public Stroke getStroke()
Returns the current stroke.
- Overrides:
- getStroke in interface Graphics2D
- Returns:
- The current stroke.
- See Also:
Graphics2D.setStroke(Stroke)
public AffineTransform getTransform()
Returns the current transform.
- Overrides:
- getTransform in interface Graphics2D
- Returns:
- The current transform.
public boolean hit(Rectangle rect, Shape s, boolean onStroke)
- Overrides:
- hit in interface Graphics2D
public void setBackground(Color color)
Sets the background color (used by theGraphics.clearRect(int,int,int,int)
method).
- Overrides:
- setBackground in interface Graphics2D
- Parameters:
color
- the color.
- See Also:
Graphics2D.getBackground()
public void setClip(int x, int y, int width, int height)
Sets the clipping region to the rectangle determined by the specified parameters.
- Parameters:
x
- The X coordinate of the upper left corner of the rect.y
- The Y coordinate of the upper left corner of the rect.width
- The width of the rect.height
- The height of the rect.
public void setComposite(Composite comp)
Sets the current compositing rule.
- Overrides:
- setComposite in interface Graphics2D
- Parameters:
comp
- the composite.
- See Also:
Graphics2D.getComposite()
public void setFont(Font font)
Sets the font for this graphics context to the specified value.
- Parameters:
font
- The new font.
public void setPaint(Paint p)
Sets the paint to be used for subsequent drawing operations.
- Overrides:
- setPaint in interface Graphics2D
- Parameters:
- See Also:
Graphics2D.getPaint()
public void setPaintMode()
Sets this context into "paint" mode, where the target pixels are completely overwritten when drawn on.
- Overrides:
- setPaintMode in interface Graphics
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
Adds or updates a hint in the current rendering hints table.
- Overrides:
- setRenderingHint in interface Graphics2D
- Parameters:
hintKey
- the hint key.hintValue
- the hint value.
public void setRenderingHints(Map hints)
Replaces the current rendering hints with the supplied hints.
- Overrides:
- setRenderingHints in interface Graphics2D
- Parameters:
hints
- the hints.
- See Also:
Graphics2D.addRenderingHints(Map)
public void setStroke(Stroke s)
Sets the stroke to be used for subsequent drawing operations.
- Overrides:
- setStroke in interface Graphics2D
- Parameters:
- See Also:
Graphics2D.getStroke()
public void setTransform(AffineTransform Tx)
Sets the current transform. If the caller specifies anull
transform, this method should set the current transform to the identity transform.
- Overrides:
- setTransform in interface Graphics2D
- Parameters:
- See Also:
Graphics2D.getTransform()
public void setXORMode(Color color)
Sets this context info "XOR" mode, where the targe pixles are XOR-ed when drawn on.
- Overrides:
- setXORMode in interface Graphics
- Parameters:
color
- The color to XOR against.
public void transform(AffineTransform Tx)
Sets the current transform to a concatenation oftransform
and the existing transform.
- Overrides:
- transform in interface Graphics2D
- Parameters:
public void translate(int x, int y)
Translates this context so that its new origin point is the point (x, y).
- Overrides:
- translate in interface Graphics2D
- Parameters:
x
- The new X coordinate of the origin.y
- The new Y coordinate of the origin.