Archived

This topic is now archived and is closed to further replies.

shrt

Scaling width of a ID3DXSprite

Recommended Posts

shrt    122
Alright, so how do I make a sprite wider? I know it scales itself by the size of the texture used.. But there must be a way to scale it manually? The thing is, I want to make some sort of power-meter, which gradually enlargens in length, when a mousebutton is pressed, you know what i'm talking about for sure. [edited by - shrt on January 25, 2004 2:28:00 PM]

Share this post


Link to post
Share on other sites
J_Vitel    126
If you want to do a power-meter why then instead of enlarging the same sprite as the meter increases, simply slips your texture?, I mean, you can have your meter texture as if it where at 100%, then, lets say you just have 50% of power, so display only one half of your sprite, I think that would make a better effect tan enlarging the same pic. ID3DXSprite::Draw can accept a RECT structure as clip parameter.

Hope that helps.

Share this post


Link to post
Share on other sites