Form1. Repaint;
CV:=TControlCanvas. Create;
CV. Control:=PaintBox1;
Paintbox1. Refresh ();
Hdc2:=paintbox1. Canvas. Handle;
Hdc1:=image1. Canvas. Handle;
I:=w div 2;
J:=h div 2;
While I & gt; 0 do
The begin
Bitblt (hdc2, I + j, j + I, w + 1, + 1 h, hdc1, I, j, srccopy);
CV. The Ellipse (the Rect (I + j, j + I, w + 1, h + 1));
I:=I - 2;
J: div=j - 2 * h w;
Sleep (20);
end;
CV. Free;
end;
This do quite ugly, I generally use bitblt, and CopyRect paintings, have already made 35 species of special effects that take curved don't know what to do
CodePudding user response:
VarNewbmp: TBitmap;
I, j, k, bmpheight, bmpwidth: Integer;
Xgroup xcount: integer;
CV: TControlCanvas;
M, n, X, Y, S: Integer;
Rgn: HRGN;
Screen: the TImage;
The begin
Newbmp:=TBitmap. Create;
Newbmp. Width:=image1. Width;
Newbmp. Height:=image1. Height;
Bmpheight:=image1. Height;
Bmpwidth:=image1. Width;
Case RadioGroup2. ItemIndex of
Zero: the begin//continuous left
Image1. Refresh ();
For I:=0 to bmpwidth do
The begin
Newbmp. Canvas. CopyRect (the Rect (bmpwidth - I, 0, bmpwidth, bmpheight),
Image1. Canvas, the Rect (0, 0, I, bmpheight));
Form1. Canvas. The Draw (0, 0, newbmp);
end;
end;
The definition of the I
CodePudding user response:
8: the begin//from right to leftForm1. Repaint;
Paintbox1. Refresh ();
Hdc2:=paintbox1. Canvas. Handle;
Hdc1:=image1. Canvas. Handle;
For I:=0 to w do
The begin
Bitblt (hdc2, w - I, 0, I, h, hdc1, w - I, 0, srccopy);
Sleep (10);
end;
end;
writing
CodePudding user response:
Procedure TForm1. FormCreate (Sender: TObject);
The begin
W:=image1. Width;
H:=image1. Height;
end;
CodePudding user response:
Let's go one thousand blog learninghttp://www.cnblogs.com/del/category/113557.html
CodePudding user response: