Changeset 447 for GraphicTest/UMainForm.pas
- Timestamp:
- Nov 22, 2012, 2:32:10 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/UMainForm.pas
r446 r447 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, StdCtrls, DateUtils, UPlatform, LCLType, IntfGraphics, fpImage, 10 Math, GraphType, Contnrs, LclIntf, Spin, UFastBitmap, UDrawMethod; 8 Classes, SysUtils, FileUtil, SynHighlighterPas, SynMemo, Forms, Controls, 9 Graphics, Dialogs, ComCtrls, ExtCtrls, StdCtrls, DateUtils, UPlatform, 10 LCLType, IntfGraphics, fpImage, Math, GraphType, Contnrs, LclIntf, Spin, 11 UFastBitmap, UDrawMethod; 11 12 12 13 const … … 15 16 type 16 17 17 18 18 { TMainForm } 19 19 20 20 TMainForm = class(TForm) 21 ButtonStop: TButton;22 21 ButtonBenchmark: TButton; 23 22 ButtonSingleTest: TButton; 23 ButtonStop: TButton; 24 CheckBoxDoubleBuffered: TCheckBox; 24 25 CheckBoxEraseBackground: TCheckBox; 25 CheckBoxDoubleBuffered: TCheckBox;26 26 FloatSpinEdit1: TFloatSpinEdit; 27 27 Label1: TLabel; … … 30 30 Label4: TLabel; 31 31 ListViewMethods: TListView; 32 Memo1: TMemo; 33 PageControl1: TPageControl; 34 Panel1: TPanel; 35 SpinEditHeight: TSpinEdit; 32 36 SpinEditWidth: TSpinEdit; 33 SpinEditHeight: TSpinEdit; 37 Splitter1: TSplitter; 38 SynMemo1: TSynMemo; 39 SynPasSyn1: TSynPasSyn; 40 TabSheet1: TTabSheet; 41 TabSheet2: TTabSheet; 34 42 TimerUpdateList: TTimer; 35 43 procedure ButtonBenchmarkClick(Sender: TObject); … … 74 82 75 83 uses 76 UDrawForm; 84 UDrawForm, ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UCanvasPixels, 85 UCanvasPixelsUpdateLock, UBGRABitmapPaintBox, UBitmapRawImageDataPaintBox, 86 UBitmapRawImageData, UBitmapRawImageDataMove, UDummyMethod, UOpenGLMethod, 87 UOpenGLPBOMethod; 88 89 const 90 DrawMethodClasses: array[0..{$IFDEF opengl}10{$ELSE}8{$ENDIF}] of TDrawMethodClass = ( 91 TCanvasPixels, TCanvasPixelsUpdateLock, TLazIntfImageColorsCopy, 92 TLazIntfImageColorsNoCopy, TBitmapRawImageData, TBitmapRawImageDataPaintBox, 93 TBitmapRawImageDataMove, TBGRABitmapPaintBox{$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF} 94 ,TDummyMethod); 95 77 96 78 97 … … 94 113 DrawMethods.Add(NewDrawMethod); 95 114 end; 115 116 PageControl1.TabIndex := 0; 96 117 end; 97 118 … … 213 234 procedure TMainForm.ListViewMethodsSelectItem(Sender: TObject; Item: TListItem; 214 235 Selected: Boolean); 236 var 237 FileName: string; 215 238 begin 216 239 UpdateInterface; 240 if Assigned(ListViewMethods.Selected) then begin 241 FileName := 'Methods' + DirectorySeparator + 'U' + 242 Copy(TDrawMethod(DrawMethods[ListViewMethods.Selected.Index]).ClassName, 2, High(Integer)) + '.pas'; 243 244 if FileExistsUTF8(FileName) then 245 SynMemo1.Lines.LoadFromFile(FileName) 246 else SynMemo1.Lines.Clear; 247 Memo1.Lines.Assign(TDrawMethod(DrawMethods[ListViewMethods.Selected.Index]).Description); 248 end; 217 249 end; 218 250
Note:
See TracChangeset
for help on using the changeset viewer.