Changeset 118


Ignore:
Timestamp:
Feb 3, 2018, 3:29:17 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Set Bitmap size at once.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/BaseWin.pas

    r111 r118  
    55
    66uses
    7   ScreenTools, Messg,
    8 
    9   LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, DrawDlg;
     7  ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
     8  DrawDlg;
    109
    1110type
     
    471470  Offscreen := TBitmap.Create;
    472471  Offscreen.PixelFormat := pf24bit;
    473   Offscreen.Width := Screen.Width;
    474472  if Screen.Height - yUnused < 480 then
    475     Offscreen.Height := 480
    476   else
    477     Offscreen.Height := Screen.Height - yUnused;
     473    Offscreen.SetSize(Screen.Width, 480)
     474  else
     475    Offscreen.SetSize(Screen.Width, Screen.Height - yUnused);
    478476  Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height);
    479477  Offscreen.Canvas.Brush.Style := bsClear;
  • trunk/LocalPlayer/Term.pas

    r111 r118  
    25572557        CityDlg.Reset;
    25582558
    2559         Mini.width := G.lx * 2;
    2560         Mini.height := G.ly;
     2559        Mini.SetSize(G.lx * 2, G.ly);
    25612560        for i := 0 to nPl - 1 do
    25622561        begin
     
    35483547  end;
    35493548  MapHeight := ClientHeight - TopBarHeight - PanelHeight + overlap;
    3550   Panel.width := ClientWidth;
    3551   Panel.height := PanelHeight;
    3552   TopBar.width := ClientWidth;
    3553   TopBar.height := TopBarHeight;
     3549  Panel.SetSize(ClientWidth, PanelHeight);
     3550  TopBar.SetSize(ClientWidth, TopBarHeight);
    35543551  MiniFrame := (lxmax_xxx - G.ly) div 2;
    35553552  xMidPanel := (G.lx + MiniFrame) * 2 + 1;
  • trunk/NoTerm.pas

    r111 r118  
    147147        TInitModuleData(Data).Flags := aiThreaded;
    148148        Shade := TBitmap.Create;
    149         Shade.Width := 64;
    150         Shade.Height := 64;
     149        Shade.SetSize(64, 64);
    151150        for x := 0 to 63 do
    152151          for y := 0 to 63 do
     
    156155              Shade.Canvas.Pixels[x, y] := $000000;
    157156        State := TBitmap.Create;
    158         State.Width := 192;
    159         State.Height := 20;
     157        State.SetSize(192, 20);
    160158        State.Canvas.Brush.Style := bsClear;
    161159        State.Canvas.Font.Assign(UniFont[ftSmall]);
     
    166164      begin
    167165        Shade.Free;
    168         State.Free
     166        State.Free;
    169167      end;
    170168
  • trunk/Start.pas

    r117 r118  
    338338    if not LoadGraphicFile(BrainPicture[i], HomeDir + 'AI' + DirectorySeparator + Brain[i].FileName + '.png',
    339339      gfNoError) then begin
    340       BrainPicture[i].width := 64;
    341       BrainPicture[i].height := 64;
     340      BrainPicture[i].SetSize(64, 64);
    342341      with BrainPicture[i].Canvas do begin
    343342        Brush.Color := $904830;
Note: See TracChangeset for help on using the changeset viewer.