Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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:

Speedometer

How can I improve the quality of the arrows?

share|improve this question
    
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
2  
You can also look at your texture filtering and anti-aliasing settings. –  Roy T. Apr 23 '13 at 10:29
1  
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

1 Answer 1

up vote 5 down vote accepted

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.

For more on the matter, take a look at http://www.learnopengles.com/android-lesson-six-an-introduction-to-texture-filtering/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.