| Modifier and Type | Field and Description |
|---|---|
| public MaskFill | |
| public int | |
| public Color | |
| private FontRenderContext | |
| public static final int | |
| public static final int | |
| public static final int | |
| public Region | |
| public int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public Composite | |
| public int | |
| public Region | |
| public int | |
| public int | |
| protected static final Composite | |
| private static final Font | |
| protected static final Stroke | |
| protected Region | |
| public PixelDrawPipe | |
| public int | |
| public PixelFillPipe | |
| protected Font | |
| private FontInfo | |
| protected FontMetrics | |
| public Color | |
| protected int | |
| private FontInfo | |
| private FontRenderContext | |
| public RenderingHints | |
| private static final AffineTransform | |
| private static final double[] | |
| public CompositeType | |
| public DrawImagePipe | |
| private int | |
| public int | |
| protected static ValidatePipe | |
| pack-priv Blit | |
| pack-priv Composite | |
| public int | |
| private static int | |
| public RenderLoops | |
| private static final int | |
| public static final double | |
| public static final double | |
| public static final double | |
| pack-priv static final int | |
| pack-priv static final int | |
| public Paint | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public int | |
| public int | |
| public int | |
| private int | |
| public ShapeDrawPipe | |
| public Stroke | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public int | |
| public int | |
| public SurfaceData | |
| public int | |
| private static final int | |
| private static AffineTransform[] | |
| public TextPipe | |
| private static double[][] | |
| public AffineTransform | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public int | |
| public int | |
| public int | |
| public Shape | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addRenderingHints(Map<?, ?>
The rendering hints to be set hints)Implements abstract java. Adds a number of preferences for the rendering algorithms. |
| public FontInfo | |
| public void | clearRect(int x, int y, int w, int h)
Implements abstract java. Clears the specified rectangle by filling it with the background color of the current drawing surface. |
| public void | clip(Shape
The Path to be intersected with the current clip. s)Implements abstract java. Intersects the current clip with the specified Path and sets the current clip to the resulting intersection. |
| public void | clipRect(int x, int y, int w, int h)
Implements abstract java. Intersects the current clip with the specified rectangle. |
| private boolean | |
| protected Object | |
| protected static Shape | |
| public AffineTransform | |
| public void | |
| public void | constrain(int x, int y, int w, int h)
Implements sun. Constrain rendering for lightweight objects. |
| public void | copyArea(int x, int y, int w, int h, int dx, int dy)
Implements abstract java. Copies an area of the component by a distance specified by
|
| public boolean | copyImage(Image img, int dx, int dy, int sx, int sy, int width, int height, Color bgcolor, ImageObserver observer)
Not part of the advertised API but a useful utility method to call internally. |
| public Graphics | |
| public void | dispose()
Implements abstract java. This object has no resources to dispose of per se, but the doc comments for the base method in java.awt.Graphics imply that this object will not be usable after it is disposed. |
| private void | |
| public void | draw(Shape
The path to be drawn. s)Implements abstract java. Strokes the outline of a Path using the settings of the current graphics state. |
| public void | drawArc(int x, int y, int w, int h, int startAngl, int arcAngl)
Implements abstract java. Draws the outline of a circular or elliptical arc covering the specified rectangle. |
| public void | drawBytes(byte[] data, int offset, int length, int x, int y)
Overrides java. Draws the text given by the specified byte array, using this graphics context's current font and color. |
| public void | drawChars(char[] data, int offset, int length, int x, int y)
Overrides java. Draws the text given by the specified character array, using this graphics context's current font and color. |
| public void | drawGlyphVector(GlyphVector gv, float x, float y)
Implements abstract java. Renders the text of the specified
|
| private Boolean | drawHiDPIImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer, AffineTransform xform)
|
| public boolean | drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
Implements abstract java. Draws an image scaled to x,y,w,h in nonblocking mode with a callback object. |
| public boolean | drawImage(Image img, int x, int y, int width, int height, Color bg, ImageObserver observer)
Implements abstract java. Draws an image scaled to x,y,w,h in nonblocking mode with a solid background color and a callback object. |
| public boolean | drawImage(Image img, int x, int y, ImageObserver observer)
Implements abstract java. Draws an image at x,y in nonblocking mode. |
| public boolean | drawImage(Image img, int x, int y, Color bg, ImageObserver observer)
Implements abstract java. Draws an image at x,y in nonblocking mode with a solid background color and a callback object. |
| public boolean | drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
Implements abstract java. Draws a subrectangle of an image scaled to a destination rectangle in nonblocking mode with a callback object. |
| 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)
Implements abstract java. Draws a subrectangle of an image scaled to a destination rectangle in nonblocking mode with a solid background color and a callback object. |
| public boolean | drawImage(Image
The image to be drawn. img, AffineTransform The transformation from image space into user space. xform, ImageObserver The image observer to be notified on the image producing
progress. observer)Implements abstract java. Draw an image, applying a transform from image space into user space before drawing. |
| public void | drawImage(BufferedImage bImg, BufferedImageOp op, int x, int y)
Implements abstract java. Renders a |
| public void | drawLine(int x1, int y1, int x2, int y2)
Implements abstract java. Draws a line, using the current color, between the points
|
| public void | drawOval(int x, int y, int w, int h)
Implements abstract java. Draws the outline of an oval. |
| public void | drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
Implements abstract java. Draws a closed polygon defined by arrays of x and y coordinates. |
| public void | drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
Implements abstract java. Draws a sequence of connected lines defined by arrays of x and y coordinates. |
| public void | drawRect(int x, int y, int w, int h)
Overrides java. Draws the outline of the specified rectangle. |
| public void | drawRenderableImage(RenderableImage img, AffineTransform xform)
Implements abstract java. Renders a
|
| public void | drawRenderedImage(RenderedImage
The image to be drawn. Does nothing if img is null. img, AffineTransform The transformation from image space into user space. xform)Implements abstract java. Draws an image, applying a transform from image space into user space before drawing. |
| public void | drawRoundRect(int x, int y, int w, int h, int arcW, int arcH)
Implements abstract java. Draws an outlined round-cornered rectangle using this graphics context's current color. |
| public void | drawString(String str, int x, int y)
Implements abstract java. Renders the text of the specified |
| public void | drawString(String str, float x, float y)
Implements abstract java. Renders the text specified by the specified |
| public void | drawString(AttributedCharacterIterator iterator, int x, int y)
Implements abstract java. Renders the text of the specified iterator applying its attributes
in accordance with the specification of the |
| public void | drawString(AttributedCharacterIterator iterator, float x, float y)
Implements abstract java. Renders the text of the specified iterator applying its attributes
in accordance with the specification of the |
| private void | drawTranslatedRenderedImage(RenderedImage img, Rectangle region, int i2uTransX, int i2uTransY)
Draw a portion of a RenderedImage tile-by-tile with a given integer image to user space translation. |
| public void | fill(Shape s)
Implements abstract java. Fills the interior of a Path using the settings of the current graphics state. |
| public void | fillArc(int x, int y, int w, int h, int startAngl, int arcAngl)
Implements abstract java. Fills a circular or elliptical arc covering the specified rectangle. |
| public void | fillOval(int x, int y, int w, int h)
Implements abstract java. Fills an oval bounded by the specified rectangle with the current color. |
| public void | fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Implements abstract java. Fills a closed polygon defined by arrays of x and y coordinates. |
| public void | fillRect(int x, int y, int w, int h)
Implements abstract java. Fills the specified rectangle. |
| public void | fillRoundRect(int x, int y, int w, int h, int arcW, int arcH)
Implements abstract java. Fills the specified rounded corner rectangle with the current color. |
| public void | finalize()
Overrides java. Graphics has a finalize method that automatically calls dispose() for subclasses. |
| private static void | fixRectangleOrientation(double[] m, Rectangle2D clip)
Sets orientation of the rectangle according to the clip. |
| public Color | getBackground()
Implements abstract java. Returns the background color used for clearing a region. |
| public Shape | |
| public Rectangle | getClipBounds()
Implements abstract java. Returns the bounding rectangle of the current clipping area. |
| public Rectangle | getClipBounds(Rectangle r)
Overrides java. Returns the bounding rectangle of the current clipping area. |
| public Color | getColor()
Implements abstract java. Gets this graphics context's current color. |
| public Region | |
| public Composite | getComposite()
Implements abstract java. Returns the current Composite in the Graphics2D state. |
| private AffineTransform | |
| public Object | |
| public Surface | getDestSurface()
Implements sun. Returns a surface currently used as a destination surface for rendering. |
| public ColorModel | |
| public GraphicsConfiguration | getDeviceConfiguration()
Implements abstract java. Return the device configuration associated with this Graphics2D. |
| public Font | |
| public FontInfo | |
| public FontMetrics | getFontMetrics()
Overrides java. Gets the font metrics of the current font. |
| public FontMetrics | getFontMetrics(Font font)
Implements abstract java. Gets the font metrics for the specified font. |
| public FontRenderContext | getFontRenderContext()
Implements abstract java. Get the rendering context of the font within this Graphics2D context. |
| public FontInfo | |
| private static Rectangle | getImageRegion(RenderedImage img, Region compClip, AffineTransform transform, AffineTransform xform, int padX, int padY)
Returns a rectangle in image coordinates that may be required in order to draw the given image into the given clipping region through a pair of AffineTransforms. |
| public Paint | getPaint()
Implements abstract java. Returns the current Paint in the Graphics2D state. |
| public Object | Returns: The preferences for rendering algorithms. The strings are defined in the RenderingHints class.The category of hint to be set. The strings
are defined in the RenderingHints class. hintKeyImplements abstract java. Returns the preferences for the rendering algorithms. |
| public RenderingHints | getRenderingHints()
Implements abstract java. Gets the preferences for the rendering algorithms. |
| private Image | getResolutionVariant(MultiResolutionImage img, int srcWidth, int srcHeight, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, AffineTransform xform)
|
| public Stroke | getStroke()
Implements abstract java. Returns the current Stroke in the Graphics2D state. |
| public SurfaceData | getSurfaceData()
Return the SurfaceData object assigned to manage the destination drawable surface of this Graphics2D. |
| private static int | getTileIndex(int p, int tileGridOffset, int tileSize)
Returns the index of the tile corresponding to the supplied position given the tile grid offset and size along the same axis. |
| public AffineTransform | getTransform()
Implements abstract java. Returns the current Transform in the Graphics2D state. |
| public boolean | Returns: True if there is a hit, false otherwise.The area in device space to check for a hit. rect, Shape The path to check for a hit. s, boolean Flag to choose between testing the stroked or
the filled path. onStroke)Implements abstract java. Checks to see if a Path intersects the specified Rectangle in device space. |
| public boolean | hitClip(int x, int y, int width, int height)
Overrides java. Returns true if the specified rectangular area might intersect the current clipping area. |
| pack-priv Shape | |
| pack-priv Shape | |
| pack-priv Shape | |
| protected void | |
| protected void | |
| private static boolean | isIntegerTranslation(AffineTransform xform)
Returns true if the given AffineTransform is an integer translation. |
| pack-priv RenderingHints | |
| private void | |
| public void | rotate(double
The angle of rotation in radians. theta)Implements abstract java. Concatenates the current transform of this Graphics2D with a rotation transformation. |
| public void | rotate(double
The angle of rotation in radians. theta, double The x coordinate of the origin of the rotation x, double The x coordinate of the origin of the rotation y)Implements abstract java. Concatenates the current transform of this Graphics2D with a translated rotation transformation. |
| public void | scale(double sx, double sy)
Implements abstract java. Concatenates the current transform of this Graphics2D with a scaling transformation. |
| private boolean | scaleImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
|
| public void | setBackground(Color
The background color that should be used in
subsequent calls to clearRect(). color)Implements abstract java. Sets the background color in this context used for clearing a region. |
| public void | setClip(int x, int y, int w, int h)
Implements abstract java. Sets the current clip to the rectangle specified by the given coordinates. |
| public void | setClip(Shape sh)
Implements abstract java. Sets the current clipping area to an arbitrary clip shape. |
| public void | setColor(Color color)
Implements abstract java. Sets this graphics context's current color to the specified color. |
| public void | setComposite(Composite
The Composite object to be used for drawing. comp)Implements abstract java. Sets the Composite in the current graphics state. |
| public void | |
| public void | |
| public void | setFont(Font font)
Implements abstract java. Sets this graphics context's font to the specified font. |
| public void | setPaint(Paint
The Paint object to be used to generate color in
the rendering process. paint)Implements abstract java. Sets the Paint in the current graphics state. |
| public void | setPaintMode()
Implements abstract java. Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. |
| public void | setRenderingHint(RenderingHints.
The key of hint to be set. The strings are
defined in the RenderingHints class. hintKey,The value indicating preferences for the specified
hint category. These strings are defined in the RenderingHints
class. hintValue)Implements abstract java. Sets the preferences for the rendering algorithms. |
| public void | setRenderingHints(Map<?, ?>
The rendering hints to be set hints)Implements abstract java. Sets the preferences for the rendering algorithms. |
| public void | setStroke(Stroke s)
Implements abstract java. Sets the |
| public void | setTransform(AffineTransform
The Transform object to be used in the rendering process. Tx)Implements abstract java. Sets the Transform in the current graphics state. |
| public void | setXORMode(Color c)
Implements abstract java. Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. |
| public void | shear(double
The factor by which coordinates are shifted towards the
positive X axis direction according to their Y coordinate shx, double The factor by which coordinates are shifted towards the
positive Y axis direction according to their X coordinate shy)Implements abstract java. Concatenates the current transform of this Graphics2D with a shearing transformation. |
| public void | transform(AffineTransform
The Transform object to be composed with the current
transform. xform)Implements abstract java. Composes a Transform object with the transform in this Graphics2D according to the rule last-specified-first-applied. |
| private boolean | |
| protected Shape | |
| protected static Shape | |
| protected static Shape | |
| public void | translate(double tx, double ty)
Implements abstract java. Concatenates the current transform of this Graphics2D with a translation transformation. |
| public void | |
| public Shape | |
| private void | |
| pack-priv void | |
| protected void | |
| public void |