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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - void()

Pages: [1]
1
Graphics / Sprite rendering messed up.
« on: April 28, 2013, 01:37:29 am »
I am creating a small game engine using SFML in C#, when the engine is rendering a sprite it draws it messed up and not scaled correctly, it is to thin and to small. I tried to use the scale function, but it seems to be a different amount for each image.

Here is my code:
        public void SetImage(string file)
        {
            Drawing.Texture ImageLoaded = new Drawing.Texture(file);
            ImageFile = new Drawing.Sprite(ImageLoaded);

            Width = (int)ImageFile.Texture.Size.X;
            Height = (int)ImageFile.Texture.Size.Y;

            ImageFile.Position = new Vector2f((float)RealX, (float)RealY);
        }
 

Pages: [1]