iKrelve / beginning-android-games

Automatically exported from code.google.com/p/beginning-android-games
0 stars 0 forks source link

Error in AndroidGraphics.java? #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Maybe i'm missing something here but shouldn't  the third line in 
AndroidGraphics.drawRect() read:

canvas.drawRect(x, y, x+width -1, y + height -1, paint);

instead of the third input being y + width -1

So: 

@Override
    public void drawRect(int x, int y, int width, int height, int color) {
        paint.setColor(color);
        paint.setStyle(Style.FILL);
        canvas.drawRect(x, y, x + width - 1, y + height - 1, paint);
    }

instead of 

@Override
    public void drawRect(int x, int y, int width, int height, int color) {
        paint.setColor(color);
        paint.setStyle(Style.FILL);
        canvas.drawRect(x, y, x + width - 1, y + width - 1, paint);
    }

?

Original issue reported on code.google.com by fox.petr...@gmail.com on 3 Feb 2012 at 8:26

GoogleCodeExporter commented 9 years ago
Apparently this was reported awhile ago (Issue 4), but the source-code on this 
website was never changed to reflect these changes.

Original comment by fox.petr...@gmail.com on 3 Feb 2012 at 8:32