| View previous topic :: View next topic |
| Author |
Message |
The Nudge Member
Joined: 20 Mar 2003 Posts: 3
|
Posted: 20/03/03 10:47 Post subject: Clear Images in TPicshow v 2.4 |
|
|
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 |
|
| Back to top |
|
 |
Kambiz Administrator
Joined: 07 Mar 2003 Posts: 506 Location: Tehran, Iran
|
Posted: 20/03/03 20:39 Post subject: |
|
|
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 |
|
| Back to top |
|
 |
The Nudge Member
Joined: 20 Mar 2003 Posts: 3
|
Posted: 06/04/03 17:50 Post subject: Thanks ! |
|
|
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 |
|
| Back to top |
|
 |
drschubi Member
Joined: 20 Aug 2003 Posts: 4
|
Posted: 14/10/03 13:32 Post subject: @all : I don't know that !!! |
|
|
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é |
|
| Back to top |
|
 |
Kambiz Administrator
Joined: 07 Mar 2003 Posts: 506 Location: Tehran, Iran
|
Posted: 14/10/03 18:28 Post subject: |
|
|
| Code: | | PicShow1.bgPicture.Graphic := nil; |
|
|
| Back to top |
|
 |
torud Member
Joined: 25 Sep 2004 Posts: 1
|
Posted: 25/09/04 02:27 Post subject: |
|
|
Hi There!
i have the same problem and i tryed the following in the procedure ShowNextImage:
| Code: |
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 |
|
| Back to top |
|
 |
gavinnosler Member
Joined: 22 Oct 2004 Posts: 3
|
Posted: 22/10/04 07:23 Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Kambiz Administrator
Joined: 07 Mar 2003 Posts: 506 Location: Tehran, Iran
|
Posted: 22/10/04 07:48 Post subject: |
|
|
I supposed all images have identical dimension. However, when the OverDraw property is False, you can clear the entire client area as follow:
| Code: | procedure TMainForm.PicShowStart(Sender: TObject; Picture, Screen: TBitmap);
begin
if not PicShow.OverDraw then
PicShow.Invalidate;
end; |
|
|
| Back to top |
|
 |
fabben Member
Joined: 06 Apr 2005 Posts: 1
|
Posted: 06/04/05 17:38 Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|