hi to all,
My problem is that when I rotate my BufferedImage and then draw it on screen the image is cut and not fully drawn.
void update() {
//...
rads=0.068*3;
if (initialRelativeYPos<23 && initialRelativeYPos%3==0){
AffineTransform af = new AffineTransform();
af.rotate(rads,width/2,height/2);
AffineTransformOp op = new AffineTransformOp(af,AffineTransformOp.TYPE_BILINEAR);
frames.set(currentFrame,(op.filter(frames.get(currentFrame) ,null)));
}
}
public void draw(Graphics g) {
if(IS_ALIVE){
g.drawImage(frames.get(currentFrame),xPos,yPos,null);
}
//...
Original image:
http://img392.imageshack.us/img392/7782/bomb5oi.png
In Game image after Transformed:
http://img441.imageshack.us/img441/9334/cutbomb0cs.jpg