Graphics2D.java 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* Copyright (C) 2000, 2002 Free Software Foundation
  2. This file is part of GNU Classpath.
  3. GNU Classpath is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. GNU Classpath is distributed in the hope that it will be useful, but
  8. WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with GNU Classpath; see the file COPYING. If not, write to the
  13. Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA.
  15. Linking this library statically or dynamically with other modules is
  16. making a combined work based on this library. Thus, the terms and
  17. conditions of the GNU General Public License cover the whole
  18. combination.
  19. As a special exception, the copyright holders of this library give you
  20. permission to link this library with independent modules to produce an
  21. executable, regardless of the license terms of these independent
  22. modules, and to copy and distribute the resulting executable under
  23. terms of your choice, provided that you also meet, for each linked
  24. independent module, the terms and conditions of the license of that
  25. module. An independent module is a module which is not derived from
  26. or based on this library. If you modify this library, you may extend
  27. this exception to your version of the library, but you are not
  28. obligated to do so. If you do not wish to do so, delete this
  29. exception statement from your version. */
  30. package java.awt;
  31. import java.awt.geom.AffineTransform;
  32. import java.awt.image.BufferedImage;
  33. import java.awt.image.BufferedImageOp;
  34. import java.awt.image.RenderedImage;
  35. import java.awt.image.ImageObserver;
  36. import java.awt.image.renderable.RenderableImage;
  37. import java.text.AttributedCharacterIterator;
  38. import java.util.Map;
  39. /**
  40. * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
  41. */
  42. public abstract class Graphics2D extends Graphics
  43. {
  44. protected Graphics2D()
  45. {
  46. }
  47. public void draw3DRect(int x, int y, int width, int height,
  48. boolean raised)
  49. {
  50. super.draw3DRect(x, y, width, height, raised);
  51. }
  52. public void fill3DRect(int x, int y, int width, int height,
  53. boolean raised)
  54. {
  55. super.fill3DRect(x, y, width, height, raised);
  56. }
  57. public abstract void draw(Shape shape);
  58. public abstract boolean drawImage(Image image, AffineTransform xform,
  59. ImageObserver obs);
  60. public abstract void drawImage(BufferedImage image,
  61. BufferedImageOp op,
  62. int x,
  63. int y);
  64. public abstract void drawRenderedImage(RenderedImage image,
  65. AffineTransform xform);
  66. public abstract void drawRenderableImage(RenderableImage image,
  67. AffineTransform xform);
  68. public abstract void drawString(String text, int x, int y);
  69. public abstract void drawString(String text, float x, float y);
  70. public abstract void drawString(AttributedCharacterIterator iterator,
  71. int x, int y);
  72. public abstract void drawString(AttributedCharacterIterator iterator,
  73. float x, float y);
  74. // public abstract void drawGlyphVector(GlyphVector g, float x, float y);
  75. public abstract void fill(Shape shape);
  76. public abstract boolean hit(Rectangle rect, Shape text,
  77. boolean onStroke);
  78. public abstract GraphicsConfiguration getDeviceConfiguration();
  79. public abstract void setComposite(Composite comp);
  80. public abstract void setPaint(Paint paint);
  81. public abstract void setStroke(Stroke stroke);
  82. public abstract void setRenderingHint(RenderingHints.Key hintKey,
  83. Object hintValue);
  84. public abstract Object getRenderingHint(RenderingHints.Key hintKey);
  85. public abstract void setRenderingHints(Map hints);
  86. public abstract void addRenderingHints(Map hints);
  87. public abstract RenderingHints getRenderingHints();
  88. public abstract void translate(int x, int y);
  89. public abstract void translate(double tx, double ty);
  90. public abstract void rotate(double theta);
  91. public abstract void rotate(double theta, double x, double y);
  92. public abstract void scale(double scaleX, double scaleY);
  93. public abstract void shear(double shearX, double shearY);
  94. public abstract void transform(AffineTransform Tx);
  95. public abstract void setTransform(AffineTransform Tx);
  96. public abstract AffineTransform getTransform();
  97. public abstract Paint getPaint();
  98. public abstract Composite getComposite();
  99. public abstract void setBackground(Color color);
  100. public abstract Color getBackground();
  101. public abstract Stroke getStroke();
  102. public abstract void clip(Shape s);
  103. // public abstract FontRenderContext getFontRenderContext();
  104. }