Grade12Programs/src/game/drawing/Draw.java
public static void imageIgnoreCutoff(String imageName, int x, int y, double angle, double scale) {
        AffineTransform t = canvas.getTransform();

        canvas.translate(Math.round(x + difx), Math.round(y + dify));
        canvas.scale(scale, scale);
        canvas.rotate(angle);

        Sprite spr = Sprites.get(imageName);
        canvas.drawImage(spr.img, Math.round(-spr.width / 2), Math.round(-spr.height / 2), null);

        canvas.setTransform(t);drawCalls++;
    }
/**
     * draws an image centered on x,y with an angle, scaled on the x and y axis.
     * will not prevent drawing if sprite is off screen.
     * @param spr   {@link game.drawing.Sprites#get(String) Sprites.get(sprite name)}
     * @param x
     * @param y
     * @param angle radians
     * @param scale pixels per pixel
     */
draws an image centered on x,y with an angle, scaled on the x and y axis.
will not prevent drawing if sprite is off screen.
draws an image centered on x y with an angle scaled on the x and y axis . will not prevent drawing if sprite is off screen .
public static void imageIgnoreCutoff(String imageName, int x, int y, double angle, double scale) {
        AffineTransform t = canvas.getTransform();
        canvas.translate(Math.round(x + difx), Math.round(y + dify));
        canvas.scale(scale, scale);
        canvas.rotate(angle);
        Sprite spr = Sprites.get(imageName);
        canvas.drawImage(spr.img, Math.round(-spr.width / 2), Math.round(-spr.height / 2), null);
        canvas.setTransform(t);drawCalls++;
    }
public static void imageIgnoreCutoff ( String imageName , int x , int y , double angle , double scale ) { AffineTransform t = canvas . getTransform ( ) ; canvas . translate ( Math . round ( x + difx ) , Math . round ( y + dify ) ) ; canvas . scale ( scale , scale ) ; canvas . rotate ( angle ) ; Sprite spr = Sprites . get ( imageName ) ; canvas . drawImage ( spr . img , Math . round ( - spr . width / 2 ) , Math . round ( - spr . height / 2 ) , null ) ; canvas . setTransform ( t ) ; drawCalls ++ ; }
draws an image centered on x,y with an angle, scaled on the x and y axis.
draws an image centered on x y with an angle scaled on the x and y axis .