Re: drawstring and timer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 04:17:55 -0700

Your probably going to have to eat the performance hit, but a time based
animation is simple. Change his y offset line to:

pth.AddString(s,ff,0,70,new Point(0,90*y+timeOffset*90),
StringFormat.GenericTypographic);

In this case timeOffset is a floating point number from 0.0 to 1.0... In
addition, you'll
want to change the loop to do a -1 to 5 instead of a 0 to 5... This'll handle
adding an
element below the bottom element as it begins to scroll up. As for scrolling a
huge region,
and not just editing his sample, I'll leave that up to you. You can't pre-blit
and scroll
a simple Bitmap anymore, so you'd have to keep a scroll offset based on a much
larger time
offset.

Mull it over for a day, if you are hopelessly stuck, then let me/us/the group
know and I'll
throw out some more code.

-- 
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Magic Gooddy" <gooddy@rambler.ru> wrote in message 
news:OqSFl4ErEHA.2544@TK2MSFTNGP10.phx.gbl...
> I'm sorry for my wrong question.
> How to scroll warped text from http://www.bobpowell.net/texteffects.htm
> can I scroll new path?
>
> -- 
> Здравствуйте!
> "Justin Rogers" <Justin@games4dotnet.com> сообщил/сообщила в новостях 
> следующее: news:u5VOhrErEHA.2732@TK2MSFTNGP09.phx.gbl...
>> Scrolling text has some nasty popping features, but your easiest option would 
>> be
>> to pre-blit the
>> entire textual content to a large in-memory surface or a series of smaller
>> surfaces (aka Bitmap)
>> and then DrawImage these over top of your control where you are hosting the
>> scroll. For this
>> to work properly you'll need a fixed background color and I recommend it over
>> drawing the
>> strings and doing screen clears because of the time it would take to render 
>> the
>> strings each
>> time.
>>
>> I imagine VG .NET would be great at this... They've optimized a number of
>> animation scenarios,
>> though I'm not sure about how they would handle a large amount of textual
>> information.
>>
>> -- 
>> Justin Rogers
>> DigiTec Web Consultants, LLC.
>> Blog: http://weblogs.asp.net/justin_rogers
>>
>>
>> "Magic Gooddy" <gooddy@rambler.ru> wrote in message
>> news:ebxBb3CrEHA.2964@TK2MSFTNGP14.phx.gbl...
>>> Hi!
>>> how can I to scroll up text using DrawString and Timer like movies titles?
>>
>> 


Relevant Pages