Clear Images in TPicshow v 2.4

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

Clear Images in TPicshow v 2.4

Postby The Nudge » March 20th, 2003, 10:47 am

Hello,


I'm still working with version 2.4 of TPicshow (I can't install version 3.0, see my other posting) and I want to design some kind of slideshow.

The Problem is, when I assign a new Image to my TPicshow Komponent
with picshow1.picture.assign(SomeTPictureimage.picture),
one could see the last Picture still in the back (especially if it is of a different width and height).
I know from the readme that I can't use the clear method to get rid of the old picture. Does anybody know a work around how I could clear the picture anyway ?

Many thanks in Advance,

Frank aka The Nudge
The Nudge
Active Member
Active Member
 
Posts: 5
Joined: March 20th, 2003, 10:49 am

Postby Kambiz » March 20th, 2003, 8:39 pm

Hi,

To remove the image that is stored in the Picture property, you can simply assign nil to Picture.Graphic. To clear the image on the screen to the background, you can call Clear method.

By the way, I recommend to use the latest version of the control. I hope my post on the other topic could be helpful.

Cheers,
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Thanks !

Postby The Nudge » April 6th, 2003, 5:50 pm

Thanks for the advice, I just came back from holiday last week so
I wasn't able to answer. I'll try it out !

Greetings,

Frank aka The Nudge
The Nudge
Active Member
Active Member
 
Posts: 5
Joined: March 20th, 2003, 10:49 am

@all : I don't know that !!!

Postby drschubi » October 14th, 2003, 1:32 pm

I have the same problem with the background( I am a beginner). How can I call the CLEAR Method, It is doesn't work. I want clear the background too.

Regards René
drschubi
Member
Member
 
Posts: 4
Joined: August 20th, 2003, 4:48 pm

Postby Kambiz » October 14th, 2003, 6:28 pm

Code: Select all
PicShow1.bgPicture.Graphic := nil;
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby torud » September 25th, 2004, 2:27 am

Hi There!

i have the same problem and i tryed the following in the procedure ShowNextImage:
Code: Select all
  if ClearOldImage.Checked then
    begin
      //PicShow.Clear;
      PicShow.bgPicture.Graphic := nil;
    end;
  // Begins the animation
  PicShow.Execute;

but the problem is always the same. if i had a large picture which fills the hole area and after it comes a smaller picture, then the old picture will not be deleted or cleared, and the old picture is in the background. i put the given code to the checkboxevent onclick and it works just for one time.

so, please, what is my mistake???

thank u tom
torud
Member
Member
 
Posts: 1
Joined: September 25th, 2004, 2:21 am

Postby gavinnosler » October 22nd, 2004, 7:23 am

My solution is to take each new image and draw it to a blank TBitmap the size of my window with a solid color background. The problem with that is if you have a large screen, that's a rather large bitmap to be transitioning, so it's a little slow (I'm about to post a topic suggesting using the Graphics32 library to speed things up.) That way you'll never have anything left over from a previous image.
gavinnosler
Member
Member
 
Posts: 3
Joined: October 22nd, 2004, 7:14 am

Postby Kambiz » October 22nd, 2004, 7:48 am

I supposed all images have identical dimension. However, when the OverDraw property is False, you can clear the entire client area as follow:

Code: Select all
procedure TMainForm.PicShowStart(Sender: TObject; Picture, Screen: TBitmap);
begin
  if not PicShow.OverDraw then
    PicShow.Invalidate;
end;
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby fabben » April 6th, 2005, 5:38 pm

I can't find the solution of this problem.

I want a transition between old pics ans new pics, so I keep overdraw=true.

However, when transition is complet, I want old pic to completely disappear.

Thanks again.
fabben
Member
Member
 
Posts: 1
Joined: April 6th, 2005, 5:27 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 0 guests

cron