The so-called louver effect is to divide the canvas into several areas, all areas
Graphics simultaneously copy the graphics, just like the flipped blinds. Hereinafter
Process example of showing special effects:
First, create a new project, add two image controls on the form, in the control
Import a bitmap (* .bmp) in the picture1 Picture property, and will image
The Visible property is set to False.
Then, define the following procedure in the code window:
PROCEDURE TFORM1.FAN;
Var r1: TRECT;
List, r, every: integer;
Begin
List: = 1;
Every: = trunc (screen.height / 10) 1;
While List <= Every Do
Begin
For r: = 0 to 10 do begin
R1: = RECT (0, r * every, screen.width, r * every list);
Image2.canvas.copyRect (R1, Image1.canvas, R1);
END;
Update;
INC;
END;
END;
You can call in the place you need in the program.
Let's take a look at how this is achieved, the code (x1, y1, x2, y2)
Indicates the selected rectangle range, (x1, y1) is the left upper corner coordinate of the rectangle, (x2, y2) is a rectangle
Coordinate in the lower right corner. The graphic display is completed by CopyRect (R1, Canvas, R2), where R1 is
The target area, R2 is a copy area, and canvas is replicated (it can also be one
Example of Tbitmap).