Mattias Gaertner wrote:
[..]
Is it still that bad after my change?
No. The flickering is gone. At least under Win32.
To get transparency in the sprite use the attached patch.
Luiz
Index: examples/sprites/playground.pas
===================================================================
--- examples/sprites/playground.pas (revision 15106)
+++ examples/sprites/playground.pas (working copy)
@@ -112,8 +112,7 @@
x:=CenterX+round(cos(t)*CenterX*2/3)-(SpriteImg.Width div 2);
y:=CenterY+round(sin(t*0.7)*CenterY*2/3)-(SpriteImg.Height div 2);
//writeln('TPlayGroundForm.UpdateImage B ',x,',',y,' ',t);
- BufferImg.Canvas.CopyRect(Rect(x,y,x+SpriteImg.Width,y+SpriteImg.Height),
-
SpriteImg.Canvas,Rect(0,0,SpriteImg.Width,SpriteImg.Height));
+ BufferImg.Canvas.Draw(x, y, SpriteImg);
//writeln('TPlayGroundForm.UpdateImage C');
// copy to image
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus