ivanik

i have sprite for drawing image (256x256), n i want to scale to 128x128 with this code :

mySprite.Transform = Matrix.Scaling(128,128,0);
mySprite.draw(textureSprite,vectorCenter,vectorPosition,Color.white);


but i got nothing, the image size still 256x256, why


Re: Game Technologies: DirectX 101 Scaling Sprite

TKM

hi ,

Basically what you've done is present the image 128 times the original size what you need to do is :

mySprite.Transform = Matrix.Scaling(128f/256f,128f/256f,0);

good luck