SetSmooth didn't seem to do much, neither did wrapping the locations in int().
Seems kinda weird. If it helps, this is the full graphics code:
from PySFML import sf
class Image(sf.Sprite):
def __init__(self, loc):
self.img = GetImage(loc)
self.img.SetSmooth(False)
sf.Sprite.__init__(self, self.img)
#Positions for drawing (relative to parent object)
self.x = 0
self.y = 0
def Render(self, App, pos=(0, 0)):
self.SetPosition(int(self.x+pos[0]), int(self.y+pos[1]))
App.Draw(self)
imageCache = {}
def GetImage(loc):
try: #Will only run if already loaded
return imageCache[loc]
except KeyError:
Image = sf.Image()
if not Image.LoadFromFile(loc):
return None
imageCache[loc] = Image
return Image
Also, if you spot some stupid newb mistakes, please point them out :3
I'm still learning
EDITI had a thought that it might be a bad PNG encode or something, so i saved a TGA, but it had the same result. Also, it would seem that no matter how it's placed, the smoothing is always exactly the same. --Possibly an error in the reading of the file?-- Nope, it's definately smoothing of some kind creeping in there
EDIT 2Did a few more tests, i have no idea what is causing this.
I saved the image using Image.SaveToFile both directly after loading, and when it's used in the Sprite, both saved an un-edited version (no blurring)
What the
hell is going on? Could it be something to do with the python binding? I'd prefer not to have to use C/++ for this, as it's a bit advanced for my current skill level.