Android: looking for a drawArc() method with inner & outer radius

You can do this: Paint paint = new Paint(); final RectF rect = new RectF(); //Example values rect.set(mWidth/2- mRadius, mHeight/2 – mRadius, mWidth/2 + mRadius, mHeight/2 + mRadius); paint.setColor(Color.GREEN); paint.setStrokeWidth(20); paint.setAntiAlias(true); paint.setStrokeCap(Paint.Cap.ROUND); paint.setStyle(Paint.Style.STROKE); canvas.drawArc(rect, -90, 360, false, paint); The key is in paint.setStyle(Paint.Style.STROKE);, it crops the arc’s center with the stroke that you define in … Read more

Changing the Coordinate System in LibGDX (Java)

If you use a Camera (which you should) changing the coordinate system is pretty simple: camera= new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera.setToOrtho(true, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); If you use TextureRegions and/or a TextureAtlas, all you need to do in addition to that is call region.flip(false, true). The reasons we use y-up by default (which you can easily change as … Read more