Java java.awt Graphics2D
PreviousNextBy API
The following index lists the tutorials for Graphics2D by API.
Methods
- Java Graphics2D addRenderingHints(Map<?, ?> hints)
- Java Graphics2D clearRect(int x, int y, int width, int height)
- Java Graphics2D clip(Shape s)
- Java Graphics2D clipRect(int x, int y, int width, int height)
- Java Graphics2D dispose()
- Java Graphics2D draw(Shape s)
- Java Graphics2D drawGlyphVector(GlyphVector g, float x, float y)
- Java Graphics2D drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
- Java Graphics2D drawImage(Image img, AffineTransform xform, ImageObserver obs)
- Java Graphics2D drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
- Java Graphics2D drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
- Java Graphics2D drawLine(int x1, int y1, int x2, int y2)
- Java Graphics2D drawOval(int x, int y, int width, int height)
- Java Graphics2D drawRect(int x, int y, int width, int height)
- Java Graphics2D drawRenderedImage(RenderedImage img, AffineTransform xform)
- Java Graphics2D drawString(AttributedCharacterIterator iterator, float x, float y)
- Java Graphics2D drawString(AttributedCharacterIterator iterator, int x, int y)
- Java Graphics2D drawString(String str, float x, float y)
- Java Graphics2D drawString(String str, int x, int y)
- Java Graphics2D fill(Shape s)
- Java Graphics2D fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
- Java Graphics2D fillOval(int x, int y, int width, int height)
- Java Graphics2D fillRect(int x, int y, int width, int height)
- Java Graphics2D finalize()
- Java Graphics2D getClip()
- Java Graphics2D getColor()
- Java Graphics2D getComposite()
- Java Graphics2D getDeviceConfiguration()
- Java Graphics2D getFont()
- Java Graphics2D getFontMetrics()
- Java Graphics2D getFontRenderContext()
- Java Graphics2D getPaint()
- Java Graphics2D getRenderingHints()
- Java Graphics2D getTransform()
- Java Graphics2D rotate(double theta)
- Java Graphics2D rotate(double theta, double x, double y)
- Java Graphics2D scale(double sx, double sy)
- Java Graphics2D setBackground(Color color)
- Java Graphics2D setClip(Shape clip)
- Java Graphics2D setColor(Color c)
- Java Graphics2D setComposite(Composite comp)
- Java Graphics2D setFont(Font font)
- Java Graphics2D setPaint(Paint paint)
- Java Graphics2D setPaintMode()
- Java Graphics2D setRenderingHint(Key hintKey, Object hintValue)
- Java Graphics2D setRenderingHints(Map<?, ?> hints)
- Java Graphics2D setStroke(Stroke s)
- Java Graphics2D setTransform(AffineTransform Tx)
- Java Graphics2D setXORMode(Color c1)
- Java Graphics2D shear(double shx, double shy)
- Java Graphics2D transform(AffineTransform Tx)
- Java Graphics2D translate(double tx, double ty)
- Java Graphics2D translate(int x, int y)
- Java Graphics2D tutorial with examples
By Examples
The following index lists the tutorials for Graphics2D by example
titles.
- Java Graphics2D Draw a Bezier curve
- Java Graphics2D Draw a cubic Bezier curve
- Java Graphics2D Draws the given BufferedImage to the canvas, centered, wholly contained within the bounds defined by the destination rectangle, and with preserved aspect ratio.
- Java Graphics2D Draws the given String on the given Graphics2D aligned to the left center of the bounding rectangle.
- Java Graphics2D Draws the given multi-lined string on the given graphics with a given horizontal and vertical alignment.
- Java Graphics2D Draws the given string on the given graphics with a given horizontal and vertical alignment and with an outline of a given width and color.
- Java Graphics2D Fill a Bezier curve
- Java Graphics2D Fills the given BufferedImage with a Paint, preserving its alpha channel.
- Java Graphics2D Resizes the input image to a squarish new image.
- Java Graphics2D Returns the bounds for the attributed string.
- Java Graphics2D Returns the height, in pixels, that the given String would be if drawn on the given Graphics.
- Java Graphics2D drawBezier(Graphics2D g2, @Nonnull Point2D p0, @Nonnull Point2D p1, @Nonnull Point2D p2, @Nonnull Point2D p3)
- Java Graphics2D drawBezier(Graphics2D g2, @Nonnull Point2D p[])
- Java Graphics2D drawBezier(Graphics2D g2, @Nonnull Point2D p[], double displacement)
- Java Graphics2D drawCenteredString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D drawChar(Graphics2D g, Font font, String charStr, int x, int y)
- Java Graphics2D drawFormattedString(Graphics2D g2, String htmlStr, int x, int y, int w, int h)
- Java Graphics2D drawHorizontalCenteredString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D drawLeftAlignedString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D drawMultilineString(Graphics2D g, String s, int x, int y, int width, int height, int alignHorizontal, int alignVertical, boolean clip)
- Java Graphics2D drawOutlinedString(Graphics2D g, String s, int x, int y, int width, int height, int alignHorizontal, int alignVertical, Color outlineColor, float outline, boolean clip)
- Java Graphics2D drawRightAlignedString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D drawString(Graphics2D g2, String str, int x, int y, int halign, int valign)
- Java Graphics2D drawStringCenter(Graphics2D g, String text, Rectangle rect, int fontHeight, Color c)
- Java Graphics2D drawStringPair(Graphics2D g, String str1, String str2, int left, int right, int y, int size, Color color, boolean bold)
- Java Graphics2D drawStringRight(Graphics2D g, String text, Rectangle rect, int fontHeight, Color c)
- Java Graphics2D drawStringRight(Graphics2D g, String text, int x, int y, int fontHeight, Color c)
- Java Graphics2D drawText()
- Java Graphics2D drawVerticalCenteredString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D fade(Graphics2D g2D)
- Java Graphics2D fillBezier(Graphics2D g2, @Nonnull Point2D p[])
- Java Graphics2D fillBezier(Graphics2D g2, @Nonnull Point2D p[], double displacement)
- Java Graphics2D filledImage(BufferedImage source, Paint paint)
- Java Graphics2D get the path for a Bezier curve
- Java Graphics2D getBezierPath(@Nonnull Point2D p[])
- Java Graphics2D getBezierPath(@Nonnull Point2D p[], double displacement)
- Java Graphics2D getStringHeight(Graphics2D g, String s)
- Java Graphics2D getStringWidth(Graphics2D g, Font font, String string)
- Java Graphics2D getStringWidth(String text, String fontName, int fontSize, Graphics2D graphics)
- Java Graphics2D getStringWithMinSpacingWidth(Graphics2D g, Font font, String string)
- Java Graphics2D resizeAndRectify(BufferedImage img, int edgeLength)
- Java Graphics2D setAntiAlias(Graphics2D g2d, boolean isAntiAliased)
PreviousNextRelated
- Java Graphics setClip(Shape clip)
- Java Graphics toString()
- Java Graphics drawPolygon(Polygon p)
- Java java.awt Graphics2D
- Java Graphics2D drawCenteredString(Graphics2D g, String s, int x, int y, int width, int height, boolean clip)
- Java Graphics2D drawChar(Graphics2D g, Font font, String charStr, int x, int y)
- Java Graphics2D drawFormattedString(Graphics2D g2, String htmlStr, int x, int y, int w, int h)