Procedure TForm1. FormPaint (Sender: TObject);
Var
G: TGPGraphics;
The begin
G:=TGPGraphics. Create (Canvas. Handle). G.D rawImage (img3, MakeRect (rt3));
G.F ree;
end;
Procedure TForm1. Timer3Timer (Sender: TObject);
The begin
Nl:=(nl 360) mod + 10;
Img3. Free;
Img3:=TGPImage. Create (' new folder \ '+ inttostr (nl) +' PNG ');
Repaint;
Inc (ll);
Nl:=(nl + 10) mod 360;
If ll>=200, then begin
Timer3. Enabled:=false;
Ll:=0;
end;
end;
PNG images is each had a total of 360
Accelerate the rotation effect, use this code to simulate second found CPU is too high, consult everybody has to have good implementation method
CodePudding user response:
If you just for the sake of speed, you can put the pictures loaded into memory, change regularlyCodePudding user response:
360 zhang? The first time I saw this method,,,The somebody else all rotate the image map
CodePudding user response:
If LZ insist on using the multiple switching scheme, to optimize the CPU, suggested that "in space, in time," starts a one-time all images are loaded into memory, rather than in figure every time to read the file (disk I/O performance overhead is too big), specific practices can create 360 a TGPGraphics object loaded into all of my pictures, when switching checkmark load line,CodePudding user response:
But less so pit dad approach should be: clock background with a picture, a pointer is dynamic drawing up, or do a pointer image rotation transform again after the poster,CodePudding user response: