Jump to content
  • Advertisement
Sign in to follow this  
r_bewick

ID3DXFont::DrawText: make lines go up instead of down

This topic is 3165 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

Hi, I would like to draw text so that when a new line needs to be made it goes above the previous one. sorry this is confusing but normally it would be like this: 1st line 2nd line 3rd line and I would like it like this: 3rd line 2nd line 1st line is this possible? thanks, r_bewick

Share this post


Link to post
Share on other sites
Advertisement
Sadly, I don't think it is possible to do directly with DrawText. Other than manually using DrawText for each line, reversing the order of the lines in the string before calling DrawText would be your option.

Share this post


Link to post
Share on other sites
With ID3DXFont not directly, it seems. First, you split your string according to the new-lines and then either either draw each line individually or merge the strings back together in reverse order and draw with one call. I recommend the latter if speed is a concern (only one draw call).

Hope that helps.


Edit: beaten[smile]

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!