Hi all,
i just start to learn your API, and I just meet a display problem.
When SFML draws a sprite in the window it's not the same as input :
My source image :
My SFML app :
Why ?
Here is my code :
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PySFML import sf
brick_image = sf.Image()
brick_image.LoadFromFile("brick_.png")
window = sf.RenderWindow(sf.VideoMode(320,240,32), "SFML")
while True:
window.Clear()
for j in range(0,24) :
for i in range(0,16) :
sprite = sf.Sprite(brick_image)
sprite.SetPosition(i * 20, j * 10)
idx = (i+j)%2
sprite.SetSubRect(sf.IntRect(20 * idx, 0, 20 + 20 * idx, 10))
window.Draw(sprite)
window.Display()
Thanks in advance.