Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: No anti aliased image text when scaling down  (Read 1495 times)

0 Members and 2 Guests are viewing this topic.

sggocu88

  • Newbie
  • *
  • Posts: 13
    • View Profile
No anti aliased image text when scaling down
« on: February 20, 2017, 11:21:58 am »
Hi. I have an 4000x3000 image. I want to scale down that image ( e.g to 0.25,0.25). But why text looks no anti aliased?? Aspect ratio is not maintained with 0.25 and 0.25 ?? Smooth is true.
Example code:

using namespace sf;

Texture texture;
texture.loadFromFile(image.png);
texture.setSmooth(true);
Sprite sprite(texture);
sprite.setScale(0.25,0.25);
sprite.setPosition(100,100);

window.clear();
window.draw(sprite);
window.display();

 
« Last Edit: February 20, 2017, 11:46:47 am by sggocu88 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Stretched image text when scaling down
« Reply #1 on: February 20, 2017, 11:39:19 am »
Stretched as in?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sggocu88

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Stretched image text when scaling down
« Reply #2 on: February 20, 2017, 11:45:57 am »
Sry, not stretched, the right word is without anti aliasing.
But at scales like 0.75 looks good ..
« Last Edit: February 20, 2017, 11:48:02 am by sggocu88 »

 

anything