Changeset 6 for trunk/Forms


Ignore:
Timestamp:
Nov 21, 2012, 1:58:03 PM (12 years ago)
Author:
chronos
Message:
  • Modified: Do not recreate bitmap during paint.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/ufrmmain1.lfm

    r4 r6  
    11object frmMain1: TfrmMain1
    2   Left = 305
     2  Left = 370
    33  Height = 389
    4   Top = 129
     4  Top = 161
    55  Width = 459
    66  Caption = 'Lazes - Lazarus Mazes'
     
    33373337    }
    33383338    Stretch = True
     3339    Visible = False
    33393340  end
    33403341  object pbMaze: TPaintBox
     
    34023403  end
    34033404  object TimerDraw: TTimer
    3404     Interval = 20
     3405    Interval = 10
    34053406    OnTimer = TimerDrawTimer
    34063407    left = 152
  • trunk/Forms/ufrmmain1.pas

    r4 r6  
    8383procedure TfrmMain1.FormCreate(Sender: TObject);
    8484begin
    85   // Reduce flocker
    86   self.DoubleBuffered := true;
     85  // Reduce flicker
     86  Self.DoubleBuffered := true;
    8787
    8888  // Set alignment images
     
    192192  begin
    193193    MessageDlg('As you can see this maze was already solved!', mtInformation, [mbOK], 0);
    194     EXIT
     194    Exit;
    195195  end;
    196196
     
    244244  // Build a new one, based on the given metrics
    245245  bld := TMazeBuilderDepthFirst.Create;
    246   Maze := bld.BuildMaze(MazeMetrics.MazeWidth, MazeMetrics.MazeHeight);
    247   bld.Free;
     246  try
     247    Maze := bld.BuildMaze(MazeMetrics.MazeWidth, MazeMetrics.MazeHeight);
     248  finally
     249    bld.Free;
     250  end;
    248251
    249252  // This one is not solved yet
Note: See TracChangeset for help on using the changeset viewer.