• Advertisement
Sign in to follow this  

[DX9] A little problem using the Sprite

This topic is 2670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,
when i try to load my image and i draw it, it appears bigger than original. I've loaded a 800x600 image, but when i display it, it too bigger!

I can't understand how can i fix it..

immaginerc.th.jpg

Uploaded with ImageShack.us

The original image:

pressstartbutton.th.png

Uploaded with ImageShack.us


This is my code:





m_sprite->Begin(D3DXSPRITE_ALPHABLEND);

D3DXVECTOR3 center(0.0f, 0.0f, 0.0f);
/*D3DXVECTOR3 position(300.0f, 500.0f, 0.0f);*/
D3DXVECTOR3 position(0.0f, 0.0f, 0.0f);

m_sprite->Draw(m_texture_sprite->texture, NULL, ¢er, &position, D3DCOLOR_ARGB(255, 255, 255, 0));

m_sprite->End();

Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
I Solved using the D3DXMatrixTransformation2D() Methods. You can find all information here: http://www.toymaker.info/Games/html/sprites.html

Bye!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement