DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   Favorites   Watched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Clear Images in TPicshow v 2.4

 
   Reply to topic       DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
The Nudge
Member


Joined: 20 Mar 2003
Posts: 3

PostPosted: 20/03/03 10:47    Post subject: Clear Images in TPicshow v 2.4 Reply with quote

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
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 506
Location: Tehran, Iran

PostPosted: 20/03/03 20:39    Post subject: Reply with quote

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
View user's profile Send e-mail Visit poster's website
The Nudge
Member


Joined: 20 Mar 2003
Posts: 3

PostPosted: 06/04/03 17:50    Post subject: Thanks ! Reply with quote

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
View user's profile
drschubi
Member


Joined: 20 Aug 2003
Posts: 4

PostPosted: 14/10/03 13:32    Post subject: @all : I don't know that !!! Reply with quote

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
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 506
Location: Tehran, Iran

PostPosted: 14/10/03 18:28    Post subject: Reply with quote

Code:
PicShow1.bgPicture.Graphic := nil;
Back to top
View user's profile Send e-mail Visit poster's website
torud
Member


Joined: 25 Sep 2004
Posts: 1

PostPosted: 25/09/04 02:27    Post subject: Reply with quote

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
View user's profile
gavinnosler
Member


Joined: 22 Oct 2004
Posts: 3

PostPosted: 22/10/04 07:23    Post subject: Reply with quote

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
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 506
Location: Tehran, Iran

PostPosted: 22/10/04 07:48    Post subject: Reply with quote

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
View user's profile Send e-mail Visit poster's website
fabben
Member


Joined: 06 Apr 2005
Posts: 1

PostPosted: 06/04/05 17:38    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
   Reply to topic       DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group