private void draw() { Canvas canvas = view.getBackground(); canvas.setColor(Color.BLUE); canvas.setAntiAliasing(true); canvas.fill(); canvas.setColor(Color.WHITE); canvas.drawCircle(0, 0, 1); canvas.drawEllipse(0, 0, 3, 2); canvas.setTextSize(20); canvas.drawText(3, 3, "Scale=" + view.getScale()); canvas.drawRectangle(2, 2, 4, 4); canvas.drawImage(2, 2, new Image("res:drawable/spain.jpg")); canvas.drawImage(2, 2, Image.JEDA_LOGO_64x64); canvas.drawLine(1, 1, 3, 1); }
@Override public Surface drawImage( Image image, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) { canvas.drawImage(image, dx, dy, dw, dh, sx, sy, sw, sh); return this; }
@Override public Surface drawImage(Image image, float dx, float dy) { canvas.drawImage(image, dx, dy); return this; }