it's easy to do with this tools i made
my skype is ishailin and msn is
ailin8@163.comi can send the tools to you
public class gCanvas extends Canvas{
Image img;
Zoom zoom = new Zoom();
gCanvas()
{
try {
img = Image.createImage("/menu160.png");
zoom.setImage(img, W, H);
} catch (IOException e) {
e.printStackTrace();
}
}
int W=50,H=70;
protected void paint(Graphics g) {
zoom.draw(g,this.getWidth()>>1, this.getHeight()>>1, 3);
g.drawImage(img, this.getWidth()>>1, this.getHeight()>>1, 3);
}
protected void keyPressed(int key)
{
zoom.setSize(W+=5,H+=5);
repaint();
}
}
//-------------------------------------------------------------------------------------------------------------
public class Zoom {
private AbstractImage globe;
private AbstractImage lastRenderedImage;
private ImageTransformationResize resizer;
private int oldW;
private int oldH;
public void setImage(Image img, int w, int h) {
/* 19*/ try {
/* 19*/ Dispose();
/* 20*/ globe = new SmartImage(img);
/* 21*/ resizer = new ImageTransformationResize();
/* 22*/ setSize(w, h);
}
/* 24*/ catch (Exception ex) {
/* 26*/ ex.printStackTrace();
}
}
public void Dispose() {
/* 32*/ globe = null;
/* 33*/ lastRenderedImage = null;
/* 34*/ resizer = null;
}
public void setSize(int w, int h) {
/* 39*/ if (w <= 0 || h <= 0) {
/* 41*/ return;
}
/* 43*/ if (w == oldW && h == oldH) {
/* 45*/ return;
} else {
/* 49*/ oldW = w;
/* 50*/ oldH = h;
/* 52*/ lastRenderedImage = null;
/* 53*/ lastRenderedImage = new SmartImage(w, h);
/* 54*/ resizer.setTargetDimensions(w, h);
/* 55*/ resizer.process(globe, lastRenderedImage);
/* 56*/ return;
}
}
public void draw(Graphics g, int x, int y, int anchor) {
/* 60*/ lastRenderedImage.drawOnGraphics(g, x, y, anchor);
}
}