Skip to content

FadingGroup_CrossFade

function

Delphi
procedure FadingGroup_CrossFade (FadeOutFadingGroupId: LongInt; FadeInFadingGroupId: LongInt);
C++Builder
void __fastcall FadingGroup_CrossFade(System::LongInt FadeOutFadingGroupId, System::LongInt FadeInFadingGroupId);
C#
public void FadingGroup_CrossFade(int FadeOutFadingGroupId, int FadeInFadingGroupId);
VB.NET
Public Sub FadingGroup_CrossFade(FadeOutFadingGroupId As Integer, FadeInFadingGroupId As Integer)
C++/Qt
void FadingGroup_CrossFade (int FadeOutFadingGroupId, int FadeInFadingGroupId);

Fades out the group identified by FadeOutFadingGroupId while simultaneously fading in the group identified by FadeInFadingGroupId, each group following its own duration and easing curve. The incoming group is expected to be at level 100% (previously faded out, or preset with FadingGroup_SetLevelPercent): an incoming group already fully visible (level 0%) does not change.

E.g. FadingGroup_CrossFade (FadingGroupScene1, FadingGroupScene2) replaces scene 1 with scene 2, and FadingGroup_CrossFade (FadingGroupScene2, FadingGroupScene1) goes back to scene 1: after the 1st cross-fade scene 1 is at level 100%, so the reverse cross-fade needs no preset.

A cross-fade replaces a group with another one. To add a group over the current picture, invoke FadingGroup_FadeIn on it alone: cross-fading from a group that includes the main video (see FadingGroup_IncludeMainVideo) fades the video to the color of that group, black by default, and leaves only the members of the incoming group over a solid frame.

To cross-fade 2 single overlays, assign each one to its own fading group. See the Fading groups chapter.