Last change
on this file was 573, checked in by chronos, 5 months ago |
- Modified: Build with Lazarus 3.4.
- Modified: Removed U prefix from unit names.
|
File size:
1.3 KB
|
Line | |
---|
1 | unit MethodMove;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | LCLIntf, LCLType, Classes, SysUtils, DrawMethod, FastBitmap, Controls, Graphics;
|
---|
7 |
|
---|
8 | type
|
---|
9 | { TMethodMove }
|
---|
10 |
|
---|
11 | TMethodMove = class(TDrawMethod)
|
---|
12 | FastBitmap2: TFastBitmap;
|
---|
13 | constructor Create; override;
|
---|
14 | destructor Destroy; override;
|
---|
15 | procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
|
---|
16 | procedure UpdateSettings; override;
|
---|
17 | procedure DrawFrame(FastBitmap: TFastBitmap); override;
|
---|
18 | end;
|
---|
19 |
|
---|
20 |
|
---|
21 | implementation
|
---|
22 |
|
---|
23 | { TMethodMove }
|
---|
24 |
|
---|
25 | constructor TMethodMove.Create;
|
---|
26 | begin
|
---|
27 | inherited;
|
---|
28 | FastBitmap2 := TFastBitmap.Create;
|
---|
29 | Caption := 'Move';
|
---|
30 | Description.Add('This method doesn''t draw anything. Measurement of memory copy' +
|
---|
31 | ' of bitmap data using Move procedure.');
|
---|
32 | end;
|
---|
33 |
|
---|
34 | destructor TMethodMove.Destroy;
|
---|
35 | begin
|
---|
36 | FreeAndNil(FastBitmap2);
|
---|
37 | inherited;
|
---|
38 | end;
|
---|
39 |
|
---|
40 | procedure TMethodMove.Init(Parent: TWinControl; Size: TPoint;
|
---|
41 | PixelFormat: TPixelFormat);
|
---|
42 | begin
|
---|
43 | FastBitmap2.Size := Size;
|
---|
44 | inherited;
|
---|
45 | end;
|
---|
46 |
|
---|
47 | procedure TMethodMove.UpdateSettings;
|
---|
48 | begin
|
---|
49 | inherited;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | procedure TMethodMove.DrawFrame(FastBitmap: TFastBitmap);
|
---|
53 | var
|
---|
54 | Size: Integer;
|
---|
55 | begin
|
---|
56 | Size := FastBitmap.Size.X * FastBitmap.Size.Y * FastPixelSize;
|
---|
57 | Move(FastBitmap.PixelsData^, FastBitmap2.PixelsData^, Size);
|
---|
58 | end;
|
---|
59 |
|
---|
60 | end.
|
---|
61 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.