# Libgdx sprite rotation (image quality)

This one is probably really simple but I didn't find a solution.

I'm trying to create a widget (speedometer) with libgdx. For the arrows I'm using the setRotation() function. But when the image is rotated, the quality drops.

The result looks like this:

How can I improve the quality of the arrows?

• not sure if libgdx has this but in java I use g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); and that helps improve the rotated image quality a lot – Savlon Apr 23 '13 at 10:21
• You can also look at your texture filtering and anti-aliasing settings. – Roy T. Apr 23 '13 at 10:29
• Yay! Thank you Roy! .setFilter(TextureFilter.Linear, TextureFilter.Linear); fixed this! :) – dzonatan Apr 23 '13 at 10:38
• @RoyT. add it as an answer, please :) – Gustavo Maciel Dec 23 '13 at 2:24

Roy T. suggested to fix this changing the texture filtering settings, On LibGDX this can be found on Texture.setFilter or changing the Texture Params if you are using the AssetLoader. Set the filter params to TextureFilter.Linear and the problem should be fixed.