📄 teintrlc.pas
字号:
UnUpdateRect2 := Rect(0, 0, Data.Width, Data.Height);
y := Data.Height;
Even := (LastExecutedFrame + 1) mod 2 = 0;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
if Even
then
begin
x := i - 2;
IntersectRect(UnUpdateRect1, UnUpdateRect1, Rect(0 , 0, x-1 , y));
IntersectRect(UnUpdateRect2, UnUpdateRect2, Rect(x+1, 0, Data.Width, y));
end
else
begin
x := IndexAux - i + 1;
IntersectRect(UnUpdateRect1, UnUpdateRect1, Rect(x+1, 0, Data.Width, y));
IntersectRect(UnUpdateRect2, UnUpdateRect2, Rect(0 , 0, x-1 , y));
end;
if Draw then
begin
MaskBmp.Canvas.MoveTo(x, 0);
MaskBmp.Canvas.LineTo(x, y);
end;
Windows.UnionRect(UpdateRect, Rect(x, 0, x+1, y), UpdateRect);
Even := not Even;
end;
if UnUpdateRect1.Bottom - UnUpdateRect1.Top > UnUpdateRect2.Bottom - UnUpdateRect2.Top
then IntersectRect(UnUpdateRect, UnUpdateRect, UnUpdateRect1)
else IntersectRect(UnUpdateRect, UnUpdateRect, UnUpdateRect2);
end;
procedure TInterlacedTransition.Style1_3Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Longint;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
x := Data.Width;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then y := (i-1) * 2
else y := IndexAux - ((i - (Pass1Limit+1)) * 2);
Windows.UnionRect(UpdateRect, Rect(0, y, x, y+1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(0, y);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_4Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Integer;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
x := Data.Width;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then y := IndexAux - ((i - 1) * 2)
else y := (i - (Pass1Limit + 1)) * 2;
Windows.UnionRect(UpdateRect, Rect(0, y, x, y+1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(0, y);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end; //EROC itnA
procedure TInterlacedTransition.Style1_5Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Longint;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
y := Data.Height;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then x := (i - 1) * 2
else x := IndexAux - ((i - (Pass1Limit + 1)) * 2);
Windows.UnionRect(UpdateRect, Rect(x, 0, x+1, y), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(x, 0);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_6Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Integer;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
y := Data.Height;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then x := IndexAux - ((i - 1) * 2)
else x := (i - (Pass1Limit + 1)) * 2;
Windows.UnionRect(UpdateRect, Rect(x, 0, x+1, y), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(x, 0);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_7Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Longint;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
x := Data.Width;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then y := (i - 1) * 2
else y := ((i - 1) * 2) - IndexAux - 2;
Windows.UnionRect(UpdateRect, Rect(0, y, x, y+1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(0, y);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_8Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Integer;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
x := Data.Width;
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then y := IndexAux - ((i - 1) * 2)
else y := IndexAux - (((i - Pass1Limit) - 1) * 2) + 1;
Windows.UnionRect(UpdateRect, Rect(0, y, x, y + 1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(0, y);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_9Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Longint;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then x := (i - 1) * 2
else x := ((i - 1) * 2) - IndexAux - 2;
y := Data.Height;
Windows.UnionRect(UpdateRect, Rect(x, 0, x + 1, y + 1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(x, 0);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style1_10Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Integer;
Draw: Boolean);
var
i,
x,
y: Integer;
Pass1: Boolean;
begin
for i:= (LastExecutedFrame + 1) to CurrentFrame do
begin
Pass1 := i <= Pass1Limit;
if Pass1
then x := IndexAux - ((i - 1) * 2)
else x := IndexAux - (((i - Pass1Limit) - 1) * 2) + 1;
y := Data.Height;
Windows.UnionRect(UpdateRect, Rect(x, 0, x + 1, y + 1), UpdateRect);
if Draw then
begin
MaskBmp.Canvas.MoveTo(x, 0);
MaskBmp.Canvas.LineTo(x, y);
end;
end;
end;
procedure TInterlacedTransition.Style2_1Frame(MaskBmp: TBitmap;
Data: TTETransitionData; CurrentFrame, LastExecutedFrame: Integer;
Draw: Boolean);
var
i: Integer;
R: TRect;
Even: Boolean;
begin
UnUpdateRect := Rect(0, 0, Data.Width, Data.Height);
Even := (LastExecutedFrame + 1) mod 2 = 0;
for i:= LastExecutedFrame to CurrentFrame-1 do
begin
if Even
then
begin
R.Left := IndexAux - i;
R.Top := IndexAux - i;
R.Right := (Data.Width - 1) - R.Left;
R.Bottom := (Data.Height - 1) - R.Top;
end
else
begin
R.Left := i;
R.Top := i;
R.Right := (Data.Width - 1) - R.Left;
R.Bottom := (Data.Height - 1) - R.Top;
end;
if(R.Left <= R.Right) and (R.Top <= R.Bottom) then
begin
Windows.UnionRect(UpdateRect, Rect(R.Left, R.Top, R.Right+1, R.Bottom+1),
UpdateRect);
IntersectRect(UnUpdateRect, UnUpdateRect, Rect(R.Left+1, R.Top+1, R.Right,
R.Bottom));
if Draw then
MaskBmp.Canvas.Polyline([Point(R.Left, R.Top), Point(R.Right, R.Top),
Point(R.Right, R.Bottom), Point(R.Left, R.Bottom),
Point(R.Left, R.Top)]);
end;
Even := not Even;
end;
end;
initialization
TERegisterTransition(TInterlacedTransition);
RegisterClasses([TInterlacedTransition]);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -