# How to render rounded shape perfectly?

I'm having issues rendering rounded shape figures. I have a Texture with different images in it and I get this whale figure from it with TextureRegion but the stroke of it looks pixelated.

The original whale image is 357x721 px and the program scalate it up or down depending on the device.

And I use TextureFilter to Nearest but it doesn't solve problem as I thought it would.

    texture = new Texture(Gdx.files.internal("texturepack_nuevo.png"));
texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);

pilar = new TextureRegion(texture,591,0,357,721);

whale_1 = new TextureRegion(texture,0,0,591,323);
whale_1.flip(false, true);

whale_2 = new TextureRegion(texture,0,323,591,323);
whale_2.flip(false, true);

whale_3 = new TextureRegion(texture,0,646,591,323);
whale_3.flip(false, true);

TextureRegion[] whales = {whale_1,whale_2,whale_3};
whaleAnimation = new Animation(0.15f, whales);
whaleAnimation.setPlayMode(Animation.PlayMode.LOOP_PINGPONG);

• Is the image you posted what you want to see (but aren't), or what you don't want to see? If the former, please post an image of what you don't want to see as well. – user1430 Jun 19 '14 at 16:41
• It's how it seems but I don't want it to seem like that. – user48352 Jun 19 '14 at 17:17

Nearest texture filtering is generally not what you want to create the appearance of smooth curves, because it simply chooses a color based on the closest integer boundary of a texel. Linear filtering (TextureFilter.Linear in libgdx) is more akin to what you want, since it will interpolate between the surrounding integer-boundary texel coordinates to arrive at a color. This can remove harsh edges, but often has the result of overcompensating and making those edges "blurry," especially for uneven scale factors.