ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Marquee
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Sabbiolina

Italy
2 Posts

Posted - Dec 01 2011 :  16:54:40  Show Profile  Reply
Hello, how do I display a scrolling text?

Tnxs

fab

1310 Posts

Posted - Dec 02 2011 :  07:13:11  Show Profile  Reply
Hello,
please look at the end of this topic:

http://www.imageen.com/ieforum/topic.asp?whichpage=1&TOPIC_ID=237

It handles TImageEnView.OnDrawBackBuffer event to write over the rendered image. You can use TCanvas to draw text.
Go to Top of Page

Sabbiolina

Italy
2 Posts

Posted - Dec 03 2011 :  09:18:36  Show Profile  Reply
But is't very static...

Go to Top of Page

fab

1310 Posts

Posted - Dec 04 2011 :  00:13:21  Show Profile  Reply
With little effort it is possible to animate. Just put a TTimer object on the form, then handle OnTimer and OnDrawBackBuffer events:

var
  textToDraw:string = 'ImageEn is an extensive component suite for image editing, display and analysis written in pure VCL '+
                      'code for Delphi and C++ Builder, and is also available for .NET.  Thousands of software developers '+
                      'use ImageEn to add powerful multimedia functionality to their applications.  Learn how easy it is to enhance your software with ImageEn!';
  pos:integer = 0;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  inc(pos);
  if pos = length(textToDraw) then
    pos := 0;
  ImageEnView1.Update();
end;

procedure TForm1.ImageEnVect1DrawBackBuffer(Sender: TObject);
begin
  with ImageEnView1.BackBuffer, Canvas do
  begin
    Font.Color := clBlue;
    Brush.Style := bsClear;
    Font.Name := 'Times New Roman';
    Font.Height := 24;
    TextOut(0, Height-Font.Height, copy(textToDraw, pos, Width div TextWidth(' ')));
  end;
end;


Yes, it can be more sophisticated (scroll pixel by pixel instead of char by char, etc...), but this is just an example.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: