Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void draw(Graphics g, double inter)
- {
- BufferedImage im;
- Graphics2D g2d = (Graphics2D)g;
- GImage gImage;
- gImage = GImages.getImage(p.sprite);
- im = gImage.imageFile;
- AffineTransform at = new AffineTransform();
- at.translate((p.xcord+((float)p.width/2))+(p.xspd*inter), (p.ycord+((float)p.height/2))+(p.yspd*inter));
- at.rotate(p.angle+(Math.PI/2));
- at.scale((double)gImage.xsize/im.getWidth(), (double)gImage.ysize/im.getHeight());
- //at.translate(-(float)p.width/2, -(float)p.height/2);
- g2d.drawImage(im, at, null);
- g2d.setColor(Color.BLUE);
- g2d.drawRect((int)p.xcord,(int)p.ycord,1,1);
- //g.setColor(Color.BLACK);
- //g.drawString(p.suh, (int)(p.xcord+(p.xspd*inter)), (int)(p.ycord+(p.yspd*inter)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement