Changeset 449 for GraphicTest


Ignore:
Timestamp:
Nov 22, 2012, 3:02:54 PM (12 years ago)
Author:
chronos
Message:
 
Location:
GraphicTest
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas

    r447 r449  
    3636  hBmp := TempBitmap.Canvas.Handle;
    3737  hPaint := PaintBox.Canvas.Handle;
    38   PaintBox.Canvas.CopyRect(Rect(0, 0, PaintBox.Width, PaintBox.Height), TempBitmap.Canvas,
    39     Rect(0, 0, TempBitmap.Width, TempBitmap.Height));
    40  // PaintBox.Canvas.Draw(0, 0, TempBitmap);
     38  //PaintBox.Canvas.CopyRect(Rect(0, 0, PaintBox.Width, PaintBox.Height), TempBitmap.Canvas,
     39  //  Rect(0, 0, TempBitmap.Width, TempBitmap.Height));
     40  PaintBox.Canvas.Draw(0, 0, TempBitmap);
    4141  //BitBlt(hPaint, 0, 0, TempBitmap.Width, TempBitmap.Height, hBmp, 0, 0, srcCopy);
    4242end;
  • GraphicTest/UDrawMethod.pas

    r448 r449  
    1919  private
    2020    FControl: TControl;
    21     function GetFPS: Real;
     21    FFPS: Real;
    2222  public
    2323    Caption: string;
     
    3030    FrameCounter: Integer;
    3131    FrameCounterStart: TDateTime;
    32     property FPS: Real read GetFPS;
     32    function GetFPS: Real;
     33    property FPS: Real read FFPS write FFPS;
    3334    procedure Init(Parent: TWinControl; Size: TPoint); virtual;
    3435    procedure Done; virtual;
     
    6061
    6162  {$IFDEF opengl}
     63
    6264  { TDrawMethodOpenGL }
    6365
  • GraphicTest/UMainForm.pas

    r448 r449  
    127127    //Application.ProcessMessages;
    128128    StartTime := NowPrecise;
     129    FrameCounterStart := NowPrecise;
     130    FrameCounter := 0;
    129131    repeat
    130132      StepStartTime := NowPrecise;
     
    136138    until TestTerminated or
    137139      ((TestTimeout > 0) and ((NowPrecise - StartTime) > OneSecond * TestTimeout));
     140    FPS := GetFPS;
    138141    Done;
    139142  end;
Note: See TracChangeset for help on using the changeset viewer.