ocd
Posts: 3
Nickname: ocd
Registered: Apr, 2002
|
|
Re: paint over an image
|
Posted: Apr 16, 2002 7:10 PM
|
|
Thanks for replying. But that wasnt really the problem that I have. check out this pieace of codes
....headers.... ....and other stuff......
priavate int x,y,id; priavte boolean start = true;
//constructor set x = y = id = 0;
public void paint(Graphics g){ if(start == true){ buffer = createImage(100,100); gBuffer = buffer.getGraphics(); } gBuffer.drawImage(images[id],x,y,this); }
public void paintImage(int x,int y, int imageID){ start = false; this.x = x; this.y = y; this.id = imageID; repaint(); }
now.. somewhere below i call paintImage() twice.
paintImage(0,0,2); paintImage(10,0,5);
I only see one image drawn at coordinate 10,0. i know I should have gotten two...
why? and how to fix it so that I get two images drawn next to each other. This problem bugs me every second.. please help..thanks !
|
|