Category - XNA

Texture2D resizing in XNA 4.0

08 Feb 2011

If you have a requirement to display a group of images of varying dimensions in a consistent manor then you will probably want to resize them as you draw them to the screen. One way to do this is to use one of the overloaded Draw methods of the SpriteBatch object that take a ‘scale’ parameter.

The demo code below does exactly this.  Initially we want to load a list of pict