Methods Summary |
---|
public abstract void | addRenderingHints(java.util.Map hints)Adds preferences for the rendering algorithms. The preferences are
arbitrary and specified by Map objects. All specified by Map object
preferences can be modified.
|
public abstract void | clip(java.awt.Shape s)Intersects the current clipping area with the specified Shape and the
result becomes a new clipping area. If current clipping area is not
defined, the Shape becomes the new clipping area. No rendering operations
are allowed outside the clipping area.
|
public abstract void | draw(java.awt.Shape s)Draws the outline of the specified Shape.
|
public void | draw3DRect(int x, int y, int width, int height, boolean raised)Draws the highlighted outline of a rectangle.
// According to the spec, color should be used instead of paint,
// so Graphics.draw3DRect resets paint and
// it should be restored after the call
Paint savedPaint = getPaint();
super.draw3DRect(x, y, width, height, raised);
setPaint(savedPaint);
|
public abstract void | drawGlyphVector(java.awt.font.GlyphVector g, float x, float y)Draws the specified GlyphVector object's text at the point x, y.
|
public abstract void | drawImage(java.awt.image.BufferedImage img, java.awt.image.BufferedImageOp op, int x, int y)Draws the BufferedImage -- modified according to the operation
BufferedImageOp -- at the point x, y.
|
public abstract boolean | drawImage(java.awt.Image img, java.awt.geom.AffineTransform xform, java.awt.image.ImageObserver obs)Draws BufferedImage transformed from image space into user space
according to the AffineTransform xform and notifies the ImageObserver.
|
public abstract void | drawRenderableImage(java.awt.image.renderable.RenderableImage img, java.awt.geom.AffineTransform xform)Draws a RenderableImage which is transformed from image space into user
according to the AffineTransform xform.
|
public abstract void | drawRenderedImage(java.awt.image.RenderedImage img, java.awt.geom.AffineTransform xform)Draws a RenderedImage which is transformed from image space into user
according to the AffineTransform xform.
|
public abstract void | drawString(java.text.AttributedCharacterIterator iterator, float x, float y)Draws the string specified by the AttributedCharacterIterator. The first
character's position is specified by the X, Y parameters.
|
public abstract void | drawString(java.text.AttributedCharacterIterator iterator, int x, int y)Draws the string specified by the AttributedCharacterIterator. The first
character's position is specified by the X, Y parameters.
|
public abstract void | drawString(java.lang.String s, float x, float y)Draws the String whose the first character position is specified by the
parameters X, Y.
|
public abstract void | drawString(java.lang.String str, int x, int y)Draws the String whose the first character coordinates are specified by
the parameters X, Y.
|
public abstract void | fill(java.awt.Shape s)Fills the interior of the specified Shape.
|
public void | fill3DRect(int x, int y, int width, int height, boolean raised)Fills a 3D rectangle with the current color. The rectangle is specified
by its width, height, and top left corner coordinates.
// According to the spec, color should be used instead of paint,
// so Graphics.fill3DRect resets paint and
// it should be restored after the call
Paint savedPaint = getPaint();
super.fill3DRect(x, y, width, height, raised);
setPaint(savedPaint);
|
public abstract java.awt.Color | getBackground()Gets the background color.
|
public abstract java.awt.Composite | getComposite()Gets the current composite of the Graphics2D.
|
public abstract java.awt.GraphicsConfiguration | getDeviceConfiguration()Gets the device configuration.
|
public abstract java.awt.font.FontRenderContext | getFontRenderContext()Gets the rendering context of the Font.
|
public abstract java.awt.Paint | getPaint()Gets the current Paint of Graphics2D.
|
public abstract java.lang.Object | getRenderingHint(java.awt.RenderingHints$Key key)Gets the value of single preference for specified key.
|
public abstract java.awt.RenderingHints | getRenderingHints()Gets the set of the rendering preferences as a collection of key/value
pairs.
|
public abstract java.awt.Stroke | getStroke()Gets current stroke of the Graphics2D.
|
public abstract java.awt.geom.AffineTransform | getTransform()Gets current affine transform of the Graphics2D.
|
public abstract boolean | hit(java.awt.Rectangle rect, java.awt.Shape s, boolean onStroke)Determines whether or not the specified Shape intersects the specified
Rectangle. If the onStroke parameter is true, this method checks whether
or not the specified Shape outline intersects the specified Rectangle,
otherwise this method checks whether or not the specified Shape's
interior intersects the specified Rectangle.
|
public abstract void | rotate(double theta)Performs a rotation transform relative to current Graphics2D Transform.
The coordinate system is rotated by the specified angle in radians
relative to current origin.
|
public abstract void | rotate(double theta, double x, double y)Performs a translated rotation transform relative to current Graphics2D
Transform. The coordinate system is rotated by the specified angle in
radians relative to current origin and then moved to point (x, y). Is
this right?
|
public abstract void | scale(double sx, double sy)Performs a linear scale transform relative to current Graphics2D
Transform. The coordinate system is rescaled vertically and horizontally
by the specified parameters.
|
public abstract void | setBackground(java.awt.Color color)Sets a new background color for clearing rectangular areas. The clearRect
method uses the current background color.
|
public abstract void | setComposite(java.awt.Composite comp)Sets the current composite for Graphics2D.
|
public abstract void | setPaint(java.awt.Paint paint)Sets the paint for Graphics2D.
|
public abstract void | setRenderingHint(java.awt.RenderingHints$Key key, java.lang.Object value)Sets a key-value pair in the current RenderingHints map.
|
public abstract void | setRenderingHints(java.util.Map hints)Replaces the current rendering hints with the specified rendering
preferences.
|
public abstract void | setStroke(java.awt.Stroke s)Sets the stroke for the Graphics2D.
|
public abstract void | setTransform(java.awt.geom.AffineTransform Tx)Overwrite the current Transform of the Graphics2D. The specified
Transform should be received from the getTransform() method and should be
used only for restoring the original Graphics2D transform after calling
draw or fill methods.
|
public abstract void | shear(double shx, double shy)Performs a shear transform relative to current Graphics2D Transform. The
coordinate system is shifted by the specified multipliers relative to
current position.
|
public abstract void | transform(java.awt.geom.AffineTransform Tx)Concatenates the AffineTransform object with current Transform of this
Graphics2D. The transforms are applied in reverse order with the last
specified transform applied first and the next transformation applied to
the result of previous transformation. More precisely, if Cx is the
current Graphics2D transform, the transform method's result with Tx as
the parameter is the transformation Rx, where Rx(p) = Cx(Tx(p)), for p -
a point in current coordinate system. Rx becomes the current Transform
for this Graphics2D.
|
public abstract void | translate(double tx, double ty)Performs a translate transform relative to current Graphics2D Transform.
The coordinate system is moved by the specified distance relative to
current position.
|
public abstract void | translate(int x, int y)Moves the origin Graphics2D Transform to the point with x, y coordinates
in current coordinate system. The new origin of coordinate system is
moved to the (x, y) point accordingly. All rendering and transform
operations are performed relative to this new origin.
|