Changeset 454 for GraphicTest/Methods
- Timestamp:
- Nov 26, 2012, 7:38:56 AM (12 years ago)
- Location:
- GraphicTest/Methods
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Methods/UBGRABitmapPaintBox.pas
r447 r454 7 7 uses 8 8 Classes, SysUtils, UDrawMethod, UFastBitmap, BGRABitmap, BGRABitmapTypes, 9 Controls ;9 Controls, Graphics; 10 10 11 11 type … … 15 15 BGRABitmap: TBGRABitmap; 16 16 procedure Paint(Sender: TObject); override; 17 procedure Init(Parent: TWinControl; Size: TPoint ); override;17 procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 18 18 constructor Create; override; 19 19 destructor Destroy; override; … … 32 32 end; 33 33 34 procedure TBGRABitmapPaintBox.Init(Parent: TWinControl; Size: TPoint );34 procedure TBGRABitmapPaintBox.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); 35 35 begin 36 inherited Init(Parent, Size);36 inherited; 37 37 BGRABitmap.SetSize(PaintBox.Width, PaintBox.Height); 38 38 end; -
GraphicTest/Methods/UCanvasPixels.pas
r447 r454 25 25 inherited; 26 26 Caption := 'TBitmap.Canvas.Pixels'; 27 Description.Add('This is simple naive approach to copy image by accessing Pixels property. ' + 28 'Method is slow because of much of overhead in access methods like multiple nested method calls, ' + 29 'pixel format conversion, update notification, etc.'); 27 30 end; 28 31 -
GraphicTest/Methods/UCanvasPixelsUpdateLock.pas
r447 r454 25 25 inherited; 26 26 Caption := 'TBitmap.Canvas.Pixels Update locking'; 27 Description.Add('This method improves basic canvas pixel access by eliminating ' + 28 'updating of visible area during complete operation. Image data is ' + 29 'painted only one at the end of complete operation'); 27 30 end; 28 31 -
GraphicTest/Methods/UDummyMethod.pas
r447 r454 25 25 inherited Create; 26 26 Caption := 'Dummy'; 27 Description.Add('This method doesn''t draw anything. It''s purpose is to measure ' + 28 'and compare speed of system and event handling.'); 27 29 end; 28 30 -
GraphicTest/Methods/UGraphics32Method.pas
r450 r454 6 6 7 7 uses 8 Classes, SysUtils, UFastBitmap, UDrawMethod, GR32, GR32_Image, Controls; 8 Classes, SysUtils, UFastBitmap, UDrawMethod, GR32, GR32_Image, Controls, 9 Graphics; 9 10 10 11 type … … 16 17 destructor Destroy; override; 17 18 procedure DrawFrame(FastBitmap: TFastBitmap); override; 18 procedure Init(Parent: TWinControl; Size: TPoint ); override;19 procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 19 20 procedure Done; override; 20 21 end; … … 29 30 inherited Create; 30 31 Caption := 'TGR32Image'; 32 Description.Add('Graphics32 is well implemented highly optimized Delphi graphic ' + 33 'library also ported to Lazarus/LCL. It uses static 32-bit wide pixel:'); 34 Description.Add('TColor32Entry = packed record'); 35 Description.Add(' case Integer of'); 36 Description.Add(' 0: (B, G, R, A: Byte);'); 37 Description.Add(' 1: (ARGB: TColor32);'); 38 Description.Add(' 2: (Planes: array[0..3] of Byte);'); 39 Description.Add(' 3: (Components: array[TColor32Component] of Byte);'); 40 Description.Add('end;'); 31 41 end; 32 42 … … 66 76 end; 67 77 68 procedure TGraphics32Method.Init(Parent: TWinControl; Size: TPoint );78 procedure TGraphics32Method.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); 69 79 begin 70 inherited Init(Parent, Size);80 inherited; 71 81 Image := TImage32.Create(Parent); 72 82 Image.Parent := Parent; -
GraphicTest/Methods/ULazIntfImageColorsNoCopy.pas
r447 r454 13 13 TLazIntfImageColorsNoCopy = class(TDrawMethodImage) 14 14 TempIntfImage: TLazIntfImage; 15 procedure Init(Parent: TWinControl; Size: TPoint ); override;15 procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 16 16 constructor Create; override; 17 17 destructor Destroy; override; … … 24 24 { TLazIntfImageColorsNoCopy } 25 25 26 procedure TLazIntfImageColorsNoCopy.Init(Parent: TWinControl; Size: TPoint );26 procedure TLazIntfImageColorsNoCopy.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); 27 27 begin 28 inherited Init(Parent, Size);28 inherited; 29 29 TempIntfImage.Free; 30 30 TempIntfImage := Image.Picture.Bitmap.CreateIntfImage; -
GraphicTest/Methods/UOpenGLPBOMethod.pas
r452 r454 6 6 7 7 uses 8 Classes, SysUtils, UDrawMethod, UFastBitmap, Controls 8 Classes, SysUtils, UDrawMethod, UFastBitmap, Controls, Graphics 9 9 {$IFDEF opengl}, GL, GLExt, OpenGLContext{$ENDIF}; 10 10 … … 16 16 pboIds: array[0..1] of GLuint; 17 17 Index, NextIndex: Integer; 18 procedure Init(AParent: TWinControl; Size: TPoint ); override;18 procedure Init(AParent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 19 19 constructor Create; override; 20 20 destructor Destroy; override; … … 31 31 //procedure glGenBuffersARB2 : procedure(n : GLsizei; buffers : PGLuint); extdecl; 32 32 33 procedure TOpenGLPBOMethod.Init(AParent: TWinControl; Size: TPoint );33 procedure TOpenGLPBOMethod.Init(AParent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); 34 34 var 35 35 DataSize: Integer;
Note:
See TracChangeset
for help on using the changeset viewer.