1 18 package org.apache.batik.ext.awt.g2d; 19 20 21 import java.awt.Color ; 22 import java.awt.Font ; 23 import java.awt.FontMetrics ; 24 import java.awt.Graphics ; 25 import java.awt.Graphics2D ; 26 import java.awt.GraphicsConfiguration ; 27 import java.awt.Image ; 28 import java.awt.Shape ; 29 import java.awt.geom.AffineTransform ; 30 import java.awt.image.BufferedImage ; 31 import java.awt.image.ImageObserver ; 32 import java.awt.image.RenderedImage ; 33 import java.awt.image.renderable.RenderableImage ; 34 import java.text.AttributedCharacterIterator ; 35 36 48 public class DefaultGraphics2D extends AbstractGraphics2D { 49 52 public DefaultGraphics2D(boolean textAsShapes){ 53 super(textAsShapes); 54 } 55 56 59 public DefaultGraphics2D(DefaultGraphics2D g){ 60 super(g); 61 } 62 63 69 public Graphics create(){ 70 return new DefaultGraphics2D(this); 71 } 72 73 97 public boolean drawImage(Image img, int x, int y, ImageObserver observer){ 98 System.err.println("drawImage"); 99 return true; 100 } 101 102 135 public boolean drawImage(Image img, int x, int y, 136 int width, int height, 137 ImageObserver observer) { 138 System.out.println("drawImage"); 139 return true; 140 } 141 142 169 public void dispose(){ 170 System.out.println("dispose"); 171 } 172 173 189 public void draw(Shape s){ 190 System.out.println("draw(Shape)"); 191 } 192 193 213 public void drawRenderedImage(RenderedImage img, 214 AffineTransform xform) { 215 System.out.println("drawRenderedImage"); 216 } 217 218 219 249 public void drawRenderableImage(RenderableImage img, 250 AffineTransform xform){ 251 System.out.println("drawRenderableImage"); 252 } 253 254 278 public void drawString(String s, float x, float y){ 279 System.out.println("drawString(String)"); 280 } 281 282 305 public void drawString(AttributedCharacterIterator iterator, 306 float x, float y) { 307 System.err.println("drawString(AttributedCharacterIterator)"); 308 } 309 310 311 312 326 public void fill(Shape s){ 327 System.err.println("fill"); 328 } 329 330 334 public GraphicsConfiguration getDeviceConfiguration(){ 335 System.out.println("getDeviceConviguration"); 336 return null; 337 } 338 339 342 private Graphics2D fmg; 343 344 { 345 BufferedImage bi 346 = new BufferedImage (1, 1, BufferedImage.TYPE_INT_ARGB); 347 348 fmg = bi.createGraphics(); 349 } 350 351 359 public FontMetrics getFontMetrics(Font f){ 360 return fmg.getFontMetrics(f); 361 } 362 363 378 public void setXORMode(Color c1){ 379 System.out.println("setXORMode"); 380 } 381 382 383 402 public void copyArea(int x, int y, int width, int height, 403 int dx, int dy){ 404 System.out.println("copyArea"); 405 } 406 407 } 408 | Popular Tags |