Home > Back-end >  Graphical effects: circular contraction, circular diffusion, fan contraction, fan-shaped spread, cov
Graphical effects: circular contraction, circular diffusion, fan contraction, fan-shaped spread, cov

Time:10-15

36: begin//round contraction
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:

Var
Newbmp: 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 left
Form1. 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 learning
http://www.cnblogs.com/del/category/113557.html

CodePudding user response:

reference 4 floor sololie response:
go one thousand blog learning
http://www.cnblogs.com/del/category/113557.html
method seems to be populated, painting while filling the background color, or remove the background color,

CodePudding user response:

Y1:=0;
Y2:=0;
//-- -- -- -- -- -- -- -- -- -- the left part of the
For the x1: w=div 2 downto 0 do
The begin
Image1. Canvas. Polygon ([Point (0, 0), Point (x1, y1), Point (w div, 2 h), Point (0, h)]);
Form1. Canvas. The Draw (0, 0, newbmp);
Application. ProcessMessages;
Sleep (10);
end;
For y1: h=0 to do
The begin
Image1. Canvas. Polygon ([Point (0, 0), Point (0, y1), Point (w div, 2 h), Point (0, h)]);
Form1. Canvas. The Draw (0, 0, newbmp);
Application. ProcessMessages;
Sleep (10);
end;
//-- -- -- -- -- -- -- -- the right side of the
For x2:=w div 2 to w do
The begin
Image1. Canvas. Polygon ([Point (x2, y2), Point (w, 0), Point (w, h), Point (w div, 2 h)]);
Form1. Canvas. The Draw (0, 0, newbmp);
Application. ProcessMessages;
Sleep (10);
end;
For y2: h=0 to do
The begin
Image1. Canvas. Polygon ([Point (w, y2), Point (w, 0), Point (w, h), Point (w div, 2 h)]);
Form1. Canvas. The Draw (0, 0, newbmp);
Application. ProcessMessages;
Sleep (10);
end;
This is the fan in the code, we just running on the left and then right now

CodePudding user response:

Almost done, but we also came close unfinished, or on their own
  • Related