Hi all,

 

I am thinking of solving this problem by moving to either OpenGL or
DirectX..which means I will have to pass the loooooong text to OpenGL or
DirectX and have it scroll across the screen..challenge is..i have never
used any of the two.

 

Anywone with basic 1 2 3 steps to get started tutorial (or a link)

 

Atleast for me to be able to show text (read from a texfile) on the screen.I
am sure I can build on it from there

 

Response will be highly appreciated.

 

--------------

I never pay attention..unless I have to!

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of bernard kioko [bernsoft]
Sent: Thursday, July 07, 2005 4:24 PM
To: [email protected]
Subject: RE: [delphi-en] TEXT SCROLLING

 

We have played around with this for sometime now.even come up with a basic
component.

The thing is we had to build a looooong text graphic with all the text we
want to scroll off the screen then we move the graphic from Right to Left -
thus achieving a scrolling effect.t



Two challenges though.



1.      There is a maximum length of graphic that we can plot - that means
we are limited on how much text we can add to the scroller.
2.      Plotting a graphic means you cannot achieve transparency.



Here is a snipped of the code that builds the graphic.



procedure TScrollTextSMS.SetActive(const Value: Boolean);

var

  i : integer;

begin

  Tick.Interval:=FInterval;

  FActive := Value;

  if Value then

  begin

    // build offscreen bitmap

    if Direction=tdFromRight then

      X:=-Width

    else

      X:=OffScreen.Width;

    OffScreen.Canvas.Font.Assign(FFont);

    OffScreen.Canvas.Brush.Color:=BackColor;

    OffScreen.Width:=0;

    for i:=0 to FScrollText.Count -1 do

    begin


OffScreen.Width:=OffScreen.Width+OffScreen.Canvas.TextWidth(ScrollText[i]);


OffScreen.Canvas.TextOut(OffScreen.Width-OffScreen.Canvas.TextWidth(ScrollTe
xt[i]),0,ScrollText[i]);

      if OffScreen.Canvas.TextHeight(ScrollText[i])>OffScreen.Height then

        OffScreen.Height:=OffScreen.Canvas.TextHeight(ScrollText[i]);

      if not Image.Empty then

      begin

        OffScreen.Width:=OffScreen.Width+Image.Width;


OffScreen.Canvas.CopyRect(Rect(OffScreen.Width-Image.Width,0,OffScreen.Width
,OffScreen.Height),Image.Canvas,Image.Canvas.ClipRect);

      end;

    end;

    OffScreen.Width:=OffScreen.Width+1;

  end

  else

  begin

    OffScreen.Width:=0;

    OffScreen.Height:=0;

    Paint;

  end;

  Tick.Enabled:=Value;



end;

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Vahan Yoghoudjian
Sent: Thursday, July 07, 2005 4:41 PM
To: [email protected]
Subject: RE: [delphi-en] TEXT SCROLLING



    Hmmmm.... nice challenge, very active list today

    I don't watch CNN but I know what you mean :)

    If I had time I'd try it myself, it intrests me... maybe a TTimer would
help? I'm not sure, for smooth scrolling you have to find the perfect
combination of 'pixels moved at once' and 'time delay'... tests will get you
there...

    You might also want to google it, I'm sure someone else has thought
before you and made a ready component...

    Good luck
Vahan

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of bernard kioko [bernsoft]
Sent: Thursday, July 07, 2005 2:39 PM
To: [email protected]
Subject: [delphi-en] TEXT SCROLLING


Here's one that's a challenge.



I am trying to create a scrolling text application that I can feed with text
(like adding into a memo) and it SCROLLS them across the screen.like seen on
CNN. Any idea of how I can achieve this with smooth scrolling?



Bernard



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


----------------------------------------------------------------------------
----




[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 




  _____  

YAHOO! GROUPS LINKS 



*      Visit your group "delphi-en
<http://groups.yahoo.com/group/delphi-en> " on the web.
  
*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  
*      Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service. 



  _____  



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 




  _____  

YAHOO! GROUPS LINKS 

 

*        Visit your group "delphi-en
<http://groups.yahoo.com/group/delphi-en> " on the web.
  
*        To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  
*        Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service. 

 

  _____  



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to