ImageEn, unit imageenview

TImageEnView.TransitionEffect

TImageEnView.TransitionEffect


Declaration

property TransitionEffect: TIETransitionType;


Description

Specifies the effect to apply when a new image is loaded.
If iettNone is specified then a transition effect is not used.

Note: This option has no effect if AsyncLoading is enabled

Default: iettNone


iettCubeRotateFromLeft2




iettShreddedFromLeft




iettRandomBoxesWithWord



Note:
Transitions will only display when loading images (e.g. using LoadFromFile). For transitions when assigning or generating images, use RunTransition
You can use the ieftBeforeLoad event of OnIONotify to customize the transition effect (e.g. when loading is triggered outside of code, by actions, etc)


Examples

// Display image using cross dissolve effect
ImageEnView1.TransitionEffect   := iettCrossDissolve;
ImageEnView1.TransitionDuration := 1500;
ImageEnView1.IO.LoadFromFile( 'C:\image.jpg' );

// NOTE: This is the same as...
ImageEnView1.PrepareTransition();
ImageEnView1.IO.LoadFromFile( 'C:\image.jpg' );
ImageEnView1.RunTransition( iettCrossDissolve, 1500 );

// Display image using a Word transition
ImageEnView1.TransitionParams.WordTransWord      := 'BLAM';
ImageEnView1.TransitionParams.WordTransFontName  := 'Arial';
ImageEnView1.TransitionParams.WordTransFontStyle := [fsBold];
ImageEnView1.TransitionEffect                    := iettRandomBoxesWithWord;
ImageEnView1.TransitionDuration                  := 1000;
ImageEnView1.IO.LoadFromFile( 'C:\image.jpg' );




// Enable a random transition effect each time an image is loaded
procedure TForm1.ImageEnView1IONotify(Sender: TObject; Event: TIEIOWorkType);
begin
  if Event = ieftBeforeLoad then
  begin
    if chkShowTransition.Checked then
      ImageEnView1.TransitionEffect := TIETransitionType( 1 + Random( ord( High( TIETransitionType )) - 2 ))  // Random transition
    else
      ImageEnView1.TransitionEffect := iettNone;
  end;
end;


See Also

TransitionDuration
TransitionParams