Changeset 470


Ignore:
Timestamp:
Apr 9, 2015, 8:41:23 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Use Graphic32 library only on Windows.
  • Fixed: Update correctly test start/stop actions enable state.
Location:
GraphicTest
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/GraphicTest.lpi

    r459 r470  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <ProjectOptions>
     
    2727              <CStyleOperator Value="False"/>
    2828              <AllowLabel Value="False"/>
     29              <CPPInline Value="False"/>
    2930              <UseAnsiStrings Value="False"/>
    3031            </SyntaxOptions>
     
    4748            </Options>
    4849          </Linking>
    49           <Other>
    50             <CompilerMessages>
    51               <UseMsgFile Value="True"/>
    52             </CompilerMessages>
    53             <CompilerPath Value="$(CompPath)"/>
    54           </Other>
    5550        </CompilerOptions>
    5651      </Item2>
     
    6459      <local>
    6560        <FormatVersion Value="1"/>
    66         <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
    6761      </local>
    6862    </RunParams>
     
    9084        <Filename Value="GraphicTest.lpr"/>
    9185        <IsPartOfProject Value="True"/>
    92         <UnitName Value="GraphicTest"/>
    9386      </Unit0>
    9487      <Unit1>
     
    131124        <Filename Value="Methods/UCanvasPixelsUpdateLock.pas"/>
    132125        <IsPartOfProject Value="True"/>
    133         <UnitName Value="UCanvasPixelsUpdateLock"/>
    134126      </Unit7>
    135127      <Unit8>
    136128        <Filename Value="Methods/ULazIntfImageColorsCopy.pas"/>
    137129        <IsPartOfProject Value="True"/>
    138         <UnitName Value="ULazIntfImageColorsCopy"/>
    139130      </Unit8>
    140131      <Unit9>
    141132        <Filename Value="Methods/ULazIntfImageColorsNoCopy.pas"/>
    142133        <IsPartOfProject Value="True"/>
    143         <UnitName Value="ULazIntfImageColorsNoCopy"/>
    144134      </Unit9>
    145135      <Unit10>
     
    156146        <Filename Value="Methods/UBitmapRawImageData.pas"/>
    157147        <IsPartOfProject Value="True"/>
    158         <UnitName Value="UBitmapRawImageData"/>
    159148      </Unit12>
    160149      <Unit13>
    161150        <Filename Value="Methods/UDummyMethod.pas"/>
    162151        <IsPartOfProject Value="True"/>
    163         <UnitName Value="UDummyMethod"/>
    164152      </Unit13>
    165153      <Unit14>
    166154        <Filename Value="Methods/UBitmapRawImageDataMove.pas"/>
    167155        <IsPartOfProject Value="True"/>
    168         <UnitName Value="UBitmapRawImageDataMove"/>
    169156      </Unit14>
    170157      <Unit15>
     
    176163        <Filename Value="Methods/UOpenGLPBOMethod.pas"/>
    177164        <IsPartOfProject Value="True"/>
    178         <UnitName Value="UOpenGLPBOMethod"/>
    179165      </Unit16>
    180166      <Unit17>
     
    199185        <SyntaxMode Value="Delphi"/>
    200186        <CStyleOperator Value="False"/>
     187        <IncludeAssertionCode Value="True"/>
    201188        <AllowLabel Value="False"/>
     189        <CPPInline Value="False"/>
    202190        <UseAnsiStrings Value="False"/>
    203191      </SyntaxOptions>
     
    210198        <StackChecks Value="True"/>
    211199      </Checks>
     200      <VerifyObjMethodCallValidity Value="True"/>
    212201    </CodeGeneration>
    213202    <Linking>
     
    222211    </Linking>
    223212    <Other>
    224       <CompilerMessages>
    225         <UseMsgFile Value="True"/>
    226       </CompilerMessages>
    227       <CustomOptions Value="-dopengl
    228 -dGR32"/>
    229       <CompilerPath Value="$(CompPath)"/>
     213      <CustomOptions Value="-dopengl"/>
    230214    </Other>
    231215  </CompilerOptions>
  • GraphicTest/GraphicTest.lpr

    r453 r470  
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, lazopenglcontext, UMainForm, UPlatform, UDrawMethod, UFastBitmap,
    11   UDrawForm, bgrabitmappack, GR32_L, UCanvasPixels, UCanvasPixelsUpdateLock,
     11  UDrawForm, bgrabitmappack,
     12  {$IFDEF WINDOWS}GR32_L,{$ENDIF}
     13  UCanvasPixels, UCanvasPixelsUpdateLock,
    1214  ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UBGRABitmapPaintBox,
    1315  UBitmapRawImageDataPaintBox, UBitmapRawImageData, UDummyMethod,
  • GraphicTest/Methods/UGraphics32Method.pas

    r459 r470  
    66
    77uses
    8   Classes, SysUtils, UFastBitmap, UDrawMethod{$IFDEF gr32}, GR32, GR32_Image{$ENDIF}, Controls,
    9   Graphics;
     8  Classes, SysUtils, UFastBitmap, UDrawMethod,
     9  {$IFDEF WINDOWS}GR32, GR32_Image,{$ENDIF}
     10  Controls, Graphics;
    1011
    11 {$IFDEF gr32}
     12{$IFDEF WINDOWS}
    1213type
    1314  { TGraphics32Method }
     
    2526implementation
    2627
    27 {$IFDEF gr32}
     28{$IFDEF WINDOWS}
    2829{ TGraphics32Method }
    2930
  • GraphicTest/UMainForm.lfm

    r454 r470  
    11object MainForm: TMainForm
    2   Left = 258
    3   Height = 444
    4   Top = 176
    5   Width = 857
     2  Left = 561
     3  Height = 577
     4  Top = 310
     5  Width = 998
    66  Caption = 'Graphic test'
    7   ClientHeight = 425
    8   ClientWidth = 857
     7  ClientHeight = 548
     8  ClientWidth = 998
    99  Menu = MainMenu1
    1010  OnClose = FormClose
     
    1212  OnDestroy = FormDestroy
    1313  OnShow = FormShow
    14   LCLVersion = '1.1'
     14  LCLVersion = '1.5'
    1515  object PageControl1: TPageControl
    16     Left = 459
    17     Height = 425
     16    Left = 600
     17    Height = 548
    1818    Top = 0
    1919    Width = 398
     
    2424    object TabSheet1: TTabSheet
    2525      Caption = 'Description'
    26       ClientHeight = 399
    27       ClientWidth = 390
     26      ClientHeight = 505
     27      ClientWidth = 392
    2828      object Memo1: TMemo
    2929        Left = 0
    30         Height = 399
     30        Height = 505
    3131        Top = 0
    32         Width = 390
     32        Width = 392
    3333        Align = alClient
    3434        ReadOnly = True
     
    3939    object TabSheet2: TTabSheet
    4040      Caption = 'Code'
    41       ClientHeight = 388
    42       ClientWidth = 390
     41      ClientHeight = 505
     42      ClientWidth = 392
    4343      inline SynMemo1: TSynMemo
    4444        Cursor = crIBeam
     
    480480          end>
    481481        MouseActions = <>
     482        MouseTextActions = <>
    482483        MouseSelActions = <>
     484        VisibleSpecialChars = [vscSpace, vscTabAtLast]
    483485        SelectedColor.BackPriority = 50
    484486        SelectedColor.ForePriority = 50
     
    487489        SelectedColor.ItalicPriority = 50
    488490        SelectedColor.UnderlinePriority = 50
     491        SelectedColor.StrikeOutPriority = 50
    489492        inline SynLeftGutterPartList1: TSynGutterPartList
    490493          object SynGutterMarks1: TSynGutterMarks
     
    511514            Width = 2
    512515            MouseActions = <>
     516            MarkupInfo.Background = clWhite
     517            MarkupInfo.Foreground = clGray
    513518          end
    514519          object SynGutterCodeFolding1: TSynGutterCodeFolding
     
    525530  object Panel1: TPanel
    526531    Left = 0
    527     Height = 425
     532    Height = 548
    528533    Top = 0
    529     Width = 454
     534    Width = 595
    530535    Align = alClient
    531536    BevelOuter = bvNone
    532     ClientHeight = 425
    533     ClientWidth = 454
     537    ClientHeight = 548
     538    ClientWidth = 595
    534539    TabOrder = 1
    535540    object ListViewMethods: TListView
    536541      Left = 4
    537       Height = 324
     542      Height = 423
    538543      Top = 4
    539       Width = 448
     544      Width = 589
    540545      Anchors = [akTop, akLeft, akRight, akBottom]
    541546      Columns = <     
     
    569574        end>
    570575      OwnerData = True
     576      PopupMenu = PopupMenu1
    571577      ReadOnly = True
    572578      RowSelect = True
     
    577583    end
    578584    object ButtonSingleTest: TButton
    579       Left = 8
    580       Height = 25
    581       Top = 336
    582       Width = 115
     585      Left = 232
     586      Height = 32
     587      Top = 468
     588      Width = 160
    583589      Action = ATestOneMethod
    584590      Anchors = [akLeft, akBottom]
     
    586592    end
    587593    object ButtonBenchmark: TButton
    588       Left = 136
    589       Height = 25
    590       Top = 336
    591       Width = 112
     594      Left = 232
     595      Height = 33
     596      Top = 432
     597      Width = 160
    592598      Action = ATestAllMethods
    593599      Anchors = [akLeft, akBottom]
     
    595601    end
    596602    object FloatSpinEdit1: TFloatSpinEdit
    597       Left = 88
    598       Height = 21
    599       Top = 368
     603      Left = 152
     604      Height = 35
     605      Top = 472
    600606      Width = 58
    601607      Anchors = [akLeft, akBottom]
     
    607613    end
    608614    object ButtonStop: TButton
    609       Left = 256
    610       Height = 25
    611       Top = 336
     615      Left = 312
     616      Height = 33
     617      Top = 502
    612618      Width = 75
    613619      Action = ATestStop
     
    617623    object Label1: TLabel
    618624      Left = 8
    619       Height = 13
    620       Top = 372
    621       Width = 69
     625      Height = 25
     626      Top = 473
     627      Width = 131
    622628      Anchors = [akLeft, akBottom]
    623629      Caption = 'Step duration:'
     
    625631    end
    626632    object Label2: TLabel
    627       Left = 152
    628       Height = 13
    629       Top = 372
    630       Width = 5
     633      Left = 216
     634      Height = 25
     635      Top = 473
     636      Width = 9
    631637      Anchors = [akLeft, akBottom]
    632638      Caption = 's'
     
    634640    end
    635641    object SpinEditWidth: TSpinEdit
    636       Left = 204
    637       Height = 21
    638       Top = 368
     642      Left = 72
     643      Height = 35
     644      Top = 432
    639645      Width = 58
    640646      Anchors = [akLeft, akBottom]
     
    645651    end
    646652    object SpinEditHeight: TSpinEdit
    647       Left = 273
    648       Height = 21
    649       Top = 368
     653      Left = 152
     654      Height = 35
     655      Top = 432
    650656      Width = 58
    651657      Anchors = [akLeft, akBottom]
     
    656662    end
    657663    object Label3: TLabel
    658       Left = 169
    659       Height = 13
    660       Top = 373
    661       Width = 23
     664      Left = 8
     665      Height = 25
     666      Top = 436
     667      Width = 42
    662668      Anchors = [akLeft, akBottom]
    663669      Caption = 'Size:'
     
    665671    end
    666672    object Label4: TLabel
    667       Left = 265
    668       Height = 13
    669       Top = 372
    670       Width = 6
     673      Left = 136
     674      Height = 25
     675      Top = 442
     676      Width = 10
    671677      Anchors = [akLeft, akBottom]
    672678      Caption = 'x'
     
    674680    end
    675681    object CheckBoxDoubleBuffered: TCheckBox
    676       Left = 336
    677       Height = 17
    678       Top = 336
    679       Width = 98
     682      Left = 400
     683      Height = 27
     684      Top = 436
     685      Width = 174
    680686      Anchors = [akLeft, akBottom]
    681687      Caption = 'Double buffered'
     
    684690    end
    685691    object CheckBoxEraseBackground: TCheckBox
    686       Left = 336
    687       Height = 17
    688       Top = 353
    689       Width = 106
     692      Left = 400
     693      Height = 27
     694      Top = 468
     695      Width = 188
    690696      Anchors = [akLeft, akBottom]
    691697      Caption = 'Erase background'
     
    694700    end
    695701    object CheckBox1: TCheckBox
    696       Left = 336
    697       Height = 17
    698       Top = 369
    699       Width = 58
     702      Left = 400
     703      Height = 27
     704      Top = 503
     705      Width = 96
    700706      Anchors = [akLeft, akBottom]
    701707      Caption = 'Opaque'
     
    705711    object Label5: TLabel
    706712      Left = 8
    707       Height = 13
    708       Top = 399
    709       Width = 61
     713      Height = 25
     714      Top = 510
     715      Width = 118
    710716      Anchors = [akLeft, akBottom]
    711717      Caption = 'Pixel format:'
     
    713719    end
    714720    object ComboBox1: TComboBox
    715       Left = 89
    716       Height = 21
    717       Top = 394
    718       Width = 100
    719       Anchors = [akLeft, akBottom]
    720       ItemHeight = 13
     721      Left = 136
     722      Height = 37
     723      Top = 508
     724      Width = 144
     725      Anchors = [akLeft, akBottom]
     726      ItemHeight = 0
    721727      OnChange = ComboBox1Change
    722728      Style = csDropDownList
     
    725731  end
    726732  object Splitter1: TSplitter
    727     Left = 454
    728     Height = 425
     733    Left = 595
     734    Height = 548
    729735    Top = 0
    730736    Width = 5
     
    734740  object SynPasSyn1: TSynPasSyn
    735741    Enabled = False
    736     AsmAttri.FrameEdges = sfeAround
    737     CommentAttri.FrameEdges = sfeAround
    738     IDEDirectiveAttri.FrameEdges = sfeAround
    739     IdentifierAttri.FrameEdges = sfeAround
    740     KeyAttri.FrameEdges = sfeAround
    741     NumberAttri.FrameEdges = sfeAround
    742     SpaceAttri.FrameEdges = sfeAround
    743     StringAttri.FrameEdges = sfeAround
    744     SymbolAttri.FrameEdges = sfeAround
    745     CaseLabelAttri.FrameEdges = sfeAround
    746     DirectiveAttri.FrameEdges = sfeAround
    747742    CompilerMode = pcmDelphi
    748743    NestedComments = False
     
    828823    top = 76
    829824  end
     825  object PopupMenu1: TPopupMenu
     826    left = 401
     827    top = 176
     828    object MenuItem9: TMenuItem
     829      Action = ATestOneMethod
     830    end
     831    object MenuItem10: TMenuItem
     832      Action = ATestAllMethods
     833    end
     834    object MenuItem11: TMenuItem
     835      Action = ATestStop
     836    end
     837  end
    830838end
  • GraphicTest/UMainForm.pas

    r459 r470  
    4343    Memo1: TMemo;
    4444    MenuItem1: TMenuItem;
     45    MenuItem10: TMenuItem;
     46    MenuItem11: TMenuItem;
    4547    MenuItem2: TMenuItem;
    4648    MenuItem3: TMenuItem;
    4749    MenuItem4: TMenuItem;
    4850    MenuItem8: TMenuItem;
     51    MenuItem9: TMenuItem;
    4952    MenuItemTest: TMenuItem;
    5053    MenuItem5: TMenuItem;
     
    5356    PageControl1: TPageControl;
    5457    Panel1: TPanel;
     58    PopupMenu1: TPopupMenu;
    5559    SaveDialog1: TSaveDialog;
    5660    SpinEditHeight: TSpinEdit;
     
    378382procedure TMainForm.UpdateInterface;
    379383begin
    380   ButtonSingleTest.Enabled := not SingleTestActive and not AllTestActive and Assigned(ListViewMethods.Selected);
    381   ButtonBenchmark.Enabled := not AllTestActive and not SingleTestActive;
    382   ButtonStop.Enabled := SingleTestActive or AllTestActive;
     384  ATestOneMethod.Enabled := not SingleTestActive and not AllTestActive and Assigned(ListViewMethods.Selected);
     385  ATestAllMethods.Enabled := not AllTestActive and not SingleTestActive;
     386  ATestStop.Enabled := SingleTestActive or AllTestActive;
    383387  SpinEditWidth.MaxValue := Screen.DesktopWidth;
    384388  SpinEditHeight.MaxValue := Screen.DesktopHeight;
Note: See TracChangeset for help on using the changeset viewer.