MDX C# Scrolling Banner with MultiColoured Text

Started by
1 comment, last by pyropaul2 14 years, 5 months ago
Hi All, I've created a scrolling banner, using C# and MDX, that uses (at the moment) the Font.DrawText function. The scroll smoothness is TV quality and in general I pleased with the performance. The only concern is with the string size which, if quite large, consumes a greater amount of processor. To deal with this, I'll cut the text string up according to what will be displayed in the rectangle and not use the whole text string. However, can someone please advise me on the following: What is the best approach to achieve multi coloured text? I would like to include, in the text, separator characters with a different colour (for example, a blue square separating news items). I guess this'll mean not using Font.DrawText. Therefore what is the best approach to achieve this? Many thanks in advance.
Advertisement
Cut the string up into segments based on properties (in this case, color) and call DrawText for each segment; that will be the most direct approach and will probably work fine, depending on your actual usage.
Many thanks jpetrie.

That was along the lines I was thinking but being quite new to this, I was not sure if this was the best way of doing this.

Again, thank you.

This topic is closed to new replies.

Advertisement