Changeset 453
- Timestamp:
- Nov 25, 2012, 5:04:36 PM (12 years ago)
- Location:
- GraphicTest
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/GraphicTest.lpi
r452 r453 66 66 </local> 67 67 </RunParams> 68 <RequiredPackages Count=" 4">68 <RequiredPackages Count="5"> 69 69 <Item1> 70 <PackageName Value="lazopenglcontext"/> 71 </Item1> 72 <Item2> 70 73 <PackageName Value="BGRABitmapPack"/> 71 74 <DefaultFilename Value="Packages/bgrabitmap/bgrabitmappack.lpk" Prefer="True"/> 72 </Item 1>73 <Item 2>75 </Item2> 76 <Item3> 74 77 <PackageName Value="GR32_L"/> 75 78 <DefaultFilename Value="Packages/Graphics32/Packages/GR32_L.lpk" Prefer="True"/> 76 </Item2>77 <Item3>78 <PackageName Value="SynEdit"/>79 79 </Item3> 80 80 <Item4> 81 <PackageName Value="SynEdit"/> 82 </Item4> 83 <Item5> 81 84 <PackageName Value="LCL"/> 82 </Item 4>85 </Item5> 83 86 </RequiredPackages> 84 87 <Units Count="18"> … … 205 208 <StackChecks Value="True"/> 206 209 </Checks> 207 <VerifyObjMethodCallValidity Value="True"/>208 210 </CodeGeneration> 209 211 <Linking> … … 221 223 <UseMsgFile Value="True"/> 222 224 </CompilerMessages> 225 <CustomOptions Value="-dopengl"/> 223 226 <CompilerPath Value="$(CompPath)"/> 224 227 </Other> -
GraphicTest/GraphicTest.lpr
r452 r453 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm, UPlatform, UDrawMethod, UFastBitmap, UDrawForm,11 bgrabitmappack, GR32_L, UCanvasPixels, UCanvasPixelsUpdateLock,10 Forms, lazopenglcontext, UMainForm, UPlatform, UDrawMethod, UFastBitmap, 11 UDrawForm, bgrabitmappack, GR32_L, UCanvasPixels, UCanvasPixelsUpdateLock, 12 12 ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UBGRABitmapPaintBox, 13 13 UBitmapRawImageDataPaintBox, UBitmapRawImageData, UDummyMethod, -
GraphicTest/UDrawMethod.pas
r451 r453 113 113 Image.SetBounds(0, 0, Size.X, Size.Y); 114 114 Image.Picture.Bitmap.SetSize(Size.X, Size.Y); 115 Image.Picture.Bitmap.PixelFormat := pf 32bit;115 Image.Picture.Bitmap.PixelFormat := pf24bit; 116 116 Image.Show; 117 117 end; -
GraphicTest/UMainForm.lfm
r452 r453 1 1 object MainForm: TMainForm 2 2 Left = 165 3 Height = 4 113 Height = 444 4 4 Top = 117 5 5 Width = 857 6 6 Caption = 'Graphic test' 7 ClientHeight = 4 117 ClientHeight = 425 8 8 ClientWidth = 857 9 Menu = MainMenu1 9 10 OnClose = FormClose 10 11 OnCreate = FormCreate … … 14 15 object PageControl1: TPageControl 15 16 Left = 459 16 Height = 4 1117 Height = 425 17 18 Top = 0 18 19 Width = 398 … … 23 24 object TabSheet1: TTabSheet 24 25 Caption = 'Description' 25 ClientHeight = 38 626 ClientWidth = 39 426 ClientHeight = 388 27 ClientWidth = 390 27 28 object Memo1: TMemo 28 29 Left = 0 29 Height = 38 630 Height = 388 30 31 Top = 0 31 Width = 39 432 Width = 390 32 33 Align = alClient 33 34 ReadOnly = True … … 38 39 object TabSheet2: TTabSheet 39 40 Caption = 'Code' 40 ClientHeight = 38 641 ClientWidth = 39 441 ClientHeight = 388 42 ClientWidth = 390 42 43 inline SynMemo1: TSynMemo 43 44 Cursor = crIBeam … … 524 525 object Panel1: TPanel 525 526 Left = 0 526 Height = 4 11527 Height = 425 527 528 Top = 0 528 529 Width = 454 529 530 Align = alClient 530 531 BevelOuter = bvNone 531 ClientHeight = 4 11532 ClientHeight = 425 532 533 ClientWidth = 454 533 534 TabOrder = 1 534 535 object ListViewMethods: TListView 535 536 Left = 9 536 Height = 3 35537 Height = 349 537 538 Top = 8 538 539 Width = 443 … … 578 579 Left = 8 579 580 Height = 25 580 Top = 3 50581 Top = 364 581 582 Width = 115 582 583 Anchors = [akLeft, akBottom] … … 588 589 Left = 136 589 590 Height = 25 590 Top = 3 50591 Top = 364 591 592 Width = 112 592 593 Anchors = [akLeft, akBottom] … … 597 598 object FloatSpinEdit1: TFloatSpinEdit 598 599 Left = 88 599 Height = 2 5600 Top = 3 78600 Height = 23 601 Top = 394 601 602 Width = 58 602 603 Anchors = [akLeft, akBottom] … … 610 611 Left = 256 611 612 Height = 25 612 Top = 3 50613 Top = 364 613 614 Width = 75 614 615 Anchors = [akLeft, akBottom] … … 620 621 Left = 8 621 622 Height = 15 622 Top = 3 84623 Width = 80623 Top = 398 624 Width = 78 624 625 Anchors = [akLeft, akBottom] 625 626 Caption = 'Step duration:' … … 629 630 Left = 152 630 631 Height = 15 631 Top = 3 84632 Width = 6632 Top = 398 633 Width = 5 633 634 Anchors = [akLeft, akBottom] 634 635 Caption = 's' … … 637 638 object SpinEditWidth: TSpinEdit 638 639 Left = 204 639 Height = 2 5640 Top = 3 78640 Height = 23 641 Top = 394 641 642 Width = 58 642 643 Anchors = [akLeft, akBottom] … … 648 649 object SpinEditHeight: TSpinEdit 649 650 Left = 273 650 Height = 2 5651 Top = 3 78651 Height = 23 652 Top = 394 652 653 Width = 58 653 654 Anchors = [akLeft, akBottom] … … 660 661 Left = 169 661 662 Height = 15 662 Top = 3 85663 Top = 399 663 664 Width = 25 664 665 Anchors = [akLeft, akBottom] … … 669 670 Left = 265 670 671 Height = 15 671 Top = 3 84672 Top = 398 672 673 Width = 6 673 674 Anchors = [akLeft, akBottom] … … 677 678 object CheckBoxDoubleBuffered: TCheckBox 678 679 Left = 336 679 Height = 2 1680 Top = 3 46681 Width = 11 6680 Height = 24 681 Top = 357 682 Width = 118 682 683 Anchors = [akLeft, akBottom] 683 684 Caption = 'Double buffered' … … 687 688 object CheckBoxEraseBackground: TCheckBox 688 689 Left = 336 689 Height = 2 1690 Top = 3 63690 Height = 24 691 Top = 374 691 692 Width = 124 692 693 Anchors = [akLeft, akBottom] … … 697 698 object CheckBox1: TCheckBox 698 699 Left = 336 699 Height = 2 1700 Top = 3 83701 Width = 6 7700 Height = 24 701 Top = 394 702 Width = 69 702 703 Anchors = [akLeft, akBottom] 703 704 Caption = 'Opaque' … … 708 709 object Splitter1: TSplitter 709 710 Left = 454 710 Height = 4 11711 Height = 425 711 712 Top = 0 712 713 Width = 5 … … 738 739 top = 164 739 740 end 741 object ActionList1: TActionList 742 left = 104 743 top = 168 744 object AExportAsWikiText: TAction 745 Caption = 'Export as Wiki text' 746 Hint = 'Export as Wiki text' 747 OnExecute = AExportAsWikiTextExecute 748 end 749 object Action1: TAction 750 Caption = 'Action1' 751 end 752 object FileExit1: TFileExit 753 Category = 'File' 754 Caption = '&Exit' 755 Hint = 'Exit' 756 ShortCut = 32883 757 end 758 end 759 object MainMenu1: TMainMenu 760 left = 160 761 top = 80 762 object MenuItem1: TMenuItem 763 Caption = 'General' 764 object MenuItem2: TMenuItem 765 Action = AExportAsWikiText 766 end 767 object MenuItem3: TMenuItem 768 Action = FileExit1 769 end 770 end 771 end 772 object SaveDialog1: TSaveDialog 773 DefaultExt = '.txt' 774 left = 308 775 top = 76 776 end 740 777 end -
GraphicTest/UMainForm.pas
r451 r453 9 9 Graphics, Dialogs, ComCtrls, ExtCtrls, StdCtrls, DateUtils, UPlatform, 10 10 LCLType, IntfGraphics, fpImage, Math, GraphType, Contnrs, LclIntf, Spin, 11 UFastBitmap, UDrawMethod;11 ActnList, Menus, StdActns, UFastBitmap, UDrawMethod; 12 12 13 13 const … … 19 19 20 20 TMainForm = class(TForm) 21 Action1: TAction; 22 AExportAsWikiText: TAction; 23 ActionList1: TActionList; 21 24 ButtonBenchmark: TButton; 22 25 ButtonSingleTest: TButton; … … 25 28 CheckBoxDoubleBuffered: TCheckBox; 26 29 CheckBoxEraseBackground: TCheckBox; 30 FileExit1: TFileExit; 27 31 FloatSpinEdit1: TFloatSpinEdit; 28 32 Label1: TLabel; … … 31 35 Label4: TLabel; 32 36 ListViewMethods: TListView; 37 MainMenu1: TMainMenu; 33 38 Memo1: TMemo; 39 MenuItem1: TMenuItem; 40 MenuItem2: TMenuItem; 41 MenuItem3: TMenuItem; 34 42 PageControl1: TPageControl; 35 43 Panel1: TPanel; 44 SaveDialog1: TSaveDialog; 36 45 SpinEditHeight: TSpinEdit; 37 46 SpinEditWidth: TSpinEdit; … … 42 51 TabSheet2: TTabSheet; 43 52 TimerUpdateList: TTimer; 53 procedure AExportAsWikiTextExecute(Sender: TObject); 44 54 procedure ButtonBenchmarkClick(Sender: TObject); 45 55 procedure ButtonSingleTestClick(Sender: TObject); … … 187 197 end; 188 198 199 procedure TMainForm.AExportAsWikiTextExecute(Sender: TObject); 200 var 201 Output: TStringList; 202 I: Integer; 203 Duration: Real; 204 begin 205 SaveDialog1.FileName := 'GraphicsTest results.txt'; 206 if SaveDialog1.Execute then 207 try 208 Output := TStringList.Create; 209 Output.Add('{| class="wikitable sortable"'); 210 Output.Add('|-'); 211 Output.Add('! Method !! FPS !! Frame duration [ms]'); 212 for I := 0 to DrawMethods.Count - 1 do 213 with TDrawMethod(DrawMethods[I]) do begin 214 Output.Add('|-'); 215 if FPS <> 0 then Duration := 1 / FPS * 1000 216 else Duration := 0; 217 Output.Add('|' + Caption + ' || ' + FloatToStr(RoundTo(FPS, -1)) + 218 ' || ' + FloatToStr(RoundTo(Duration, -1))); 219 end; 220 Output.Add('|}'); 221 Output.SaveToFile(SaveDialog1.FileName); 222 finally 223 Output.Free; 224 end; 225 end; 226 189 227 procedure TMainForm.ButtonStopClick(Sender: TObject); 190 228 begin
Note:
See TracChangeset
for help on using the changeset viewer.