La classe Graphics2D
![]()
Objet par l'intermédiaire duquel sont programmés les affichages graphiques au sein des fonctions void paint(Graphics g) surchargées dans les classes Java ayant à gérer un affichage.
Constructeur |
| protected Graphics2D() |
Valeur rendue |
Nom et paramètres |
| void | addRenderingHints(Map hints) |
| void | clip(Shape s) |
| void | draw(Shape s) |
| void | draw3DRect(int x, int y, int width, int height, boolean raised) |
| void | drawGlyphVector(GlyphVector g, float x, float y) |
| void | drawImage(BufferedImage img, BufferedImageOp op, int x, int y) |
| boolean | drawImage(Image img, AffineTransform xform, ImageObserver obs) |
| void | drawRenderableImage(RenderableImage img, AffineTransform xform) |
| void | drawRenderedImage(RenderedImage img, AffineTransform xform) |
| void | drawString(AttributedCharacterIterator iterator, float x, float y) |
| void | drawString(AttributedCharacterIterator iterator, int x, int y) |
| void | drawString(String s, float x, float y) |
| void | drawString(String str, int x, int y) |
| void | fill(Shape s) |
| void | fill3DRect(int x, int y, int width, int height, boolean raised) |
| Color | getBackground() |
| Composite | getComposite() |
| GraphicsConfiguration | getDeviceConfiguration() |
| FontRenderContext | getFontRenderContext() |
| Paint | getPaint() |
| Object | getRenderingHint(RenderingHints.Key hintKey) |
| RenderingHints | getRenderingHints() |
| Stroke | getStroke() |
| AffineTransform | getTransform() |
| boolean | hit(Rectangle rect, Shape s, boolean onStroke) |
| void | rotate(double theta) |
| void | rotate(double theta, double x, double y) |
| void | scale(double sx, double sy) |
| void | setBackground(Color color) |
| void | setComposite(Composite comp) |
| void | setPaint(Paint paint) |
| void | setRenderingHint(RenderingHints.Key hintKey, Object hintValue) |
| void | setRenderingHints(Map hints) |
| void | setStroke(Stroke s) |
| void | setTransform(AffineTransform Tx) |
| void | shear(double shx, double shy) |
| void | transform(AffineTransform Tx) |
| void | translate(double tx, double ty) |
| void | translate(int x, int y) |
![]()