Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,183
Hi I got a image that I want to make smaller. The spritebatch.Draw(stuff) wont allow float values so I cant scale it to 0.2 or something. Solution?
How about the 4 seconds that it takes to do a google search? http://msdn.microsoft.com/en-us/library/ff433988.aspx
spritebatch.Draw(button, new Vector2(20,400), null, null?, color.White, ???, ???, 0,2f, None, 0f)
//I think this is somewhat right, but as you see I dont know a few fields.
Use GIMP and resize the image to the size you want to use it at. If you want the size to be dynamic (not determinable before execution) then you may want to use a graphic plugin that supports float positions and scales.
Personally I think it does support scale by that nice scale parameter that GhostWolf so kindly showed us.
Tryspritebatch.Draw(button, new Vector2(20,400), null, null?, color.White, ???, ???, 0,2f, None, 0f)
//I think this is somewhat right, but as you see I dont know a few fields.
spritebatch.Draw(button, new Vector2(20,400), null, color.White, 0f, null, 0.2f, null, 0f)
spriteBatch.Draw(hp, new Vector2(0,400), null, Color.White, 0, new Vector2(0,0), 0,9f, SpriteEffects.None, 1)