Ignore:
Timestamp:
Nov 22, 2012, 1:32:52 PM (12 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/UMainForm.pas

    r444 r445  
    2222    ButtonBenchmark: TButton;
    2323    ButtonSingleTest: TButton;
     24    CheckBoxEraseBackground: TCheckBox;
     25    CheckBoxDoubleBuffered: TCheckBox;
    2426    FloatSpinEdit1: TFloatSpinEdit;
    2527    Label1: TLabel;
     
    3436    procedure ButtonSingleTestClick(Sender: TObject);
    3537    procedure ButtonStopClick(Sender: TObject);
     38    procedure CheckBoxDoubleBufferedChange(Sender: TObject);
     39    procedure CheckBoxEraseBackgroundChange(Sender: TObject);
    3640    procedure FormCreate(Sender: TObject);
    3741    procedure FormDestroy(Sender: TObject);
     
    157161end;
    158162
     163procedure TMainForm.CheckBoxDoubleBufferedChange(Sender: TObject);
     164begin
     165  DrawForm.DoubleBuffered := CheckBoxDoubleBuffered.Checked;
     166end;
     167
     168procedure TMainForm.CheckBoxEraseBackgroundChange(Sender: TObject);
     169begin
     170  DrawForm.EraseBackgroundEnabled := CheckBoxEraseBackground.Checked;
     171end;
     172
    159173procedure TMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    160174begin
     
    243257  SpinEditWidth.MaxValue := Screen.DesktopWidth;
    244258  SpinEditHeight.MaxValue := Screen.DesktopHeight;
     259  CheckBoxDoubleBuffered.Checked := DrawForm.DoubleBuffered;
     260  CheckBoxEraseBackground.Checked := DrawForm.EraseBackgroundEnabled;
    245261end;
    246262
    247263procedure TMainForm.UpdateFrameSize;
    248264begin
    249   DrawForm.SetBounds(DrawForm.Left, DrawForm.Top, FrameSize.X, FrameSize.Y);
     265  DrawForm.ClientWidth := FrameSize.X;
     266  DrawForm.ClientHeight := FrameSize.Y;
    250267  GenerateSceneFrames;
    251268end;
Note: See TracChangeset for help on using the changeset viewer.