Page 1 of 1

Write on Picshow

PostPosted: July 25th, 2003, 3:51 pm
by epalomaro
I want to write a dynammic text before the picture slides. And this text will animate together the clip, I can I do that?

Thanks

Eduardo

PostPosted: July 25th, 2003, 5:56 pm
by Kambiz
Unfortunately the OnStart event of PicShow does not pass the image as parameter, however by defining a boolean variable and using OnStop and OnBeforeNewFrame events of PisShow you can write a text on the image.

Code: Select all
procedure TForm1.PicShow1Stop(Sender: TObject);
begin
  Stamped := False;
end;

procedure TForm1.PicShow1BeforeNewFrame(Sender: TObject; Picture, Screen: TBitmap);
begin
  if not Stamped then
  begin
    Stamped := True;
    Picture.Canvas.TextOut(10, 10, 'Sample');
  end;
end;


In the next release of PicShow I'll modify the OnStart event to pass the Picture as parameter.

Cheers,
Kambiz

PostPosted: July 26th, 2003, 2:08 pm
by Kambiz
I just released the new update of PicShow. As I mentioned in my last post, I modified the OnStart event to passes the image to the handler. So, using the new release you can reach to your goal by the following code:

Code: Select all
procedure TForm1.PicShow1Start(Sender: TObject; Picture, Screen: TBitmap);
begin
  Picture.Canvas.TextOut(10, 10, 'Sample');
end;


Cheers,
Kambiz