Changeset 40


Ignore:
Timestamp:
Jan 9, 2017, 8:28:51 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: More bitmaps to solve black background problem.
  • Fixed: Bad drawing of gradient lines.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/BaseWin.pas

    r38 r40  
    476476  else
    477477    Offscreen.Height := Screen.Height - yUnused;
     478  Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height);
    478479  Offscreen.Canvas.Brush.Style := bsClear;
    479480end;
  • trunk/LocalPlayer/Draft.pas

    r38 r40  
    8888  Back := TBitmap.Create;
    8989  Back.PixelFormat := pf24bit;
    90   Back.Width := ClientWidth;
    91   Back.Height := ClientHeight;
     90  Back.SetSize(ClientWidth, ClientHeight);
     91  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    9292  Template := TBitmap.Create;
    9393  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'MiliRes', gfNoGamma);
  • trunk/LocalPlayer/Help.pas

    r39 r40  
    231231  TerrIcon := TBitmap.Create;
    232232  TerrIcon.PixelFormat := pf24bit;
    233   TerrIcon.Width := xSizeBig;
    234   TerrIcon.Height := ySizeBig;
     233  TerrIcon.SetSize(xSizeBig, ySizeBig);
     234  TerrIcon.Canvas.FillRect(0, 0, TerrIcon.Width, TerrIcon.Height);
    235235  SearchContent := '';
    236236  nHist := -1;
  • trunk/LocalPlayer/IsoEngine.pas

    r38 r40  
    399399  Borders := TBitmap.Create;
    400400  Borders.PixelFormat := pf24bit;
    401   Borders.Width := xxt * 2;
    402   Borders.Height := (yyt * 2) * nPl;
     401  Borders.SetSize(xxt * 2,(yyt * 2) * nPl);
     402  Borders.Canvas.FillRect(0, 0, Borders.Width, Borders.Height);
    403403  BordersOK := 0;
    404404end;
  • trunk/LocalPlayer/NatStat.pas

    r38 r40  
    8989  Back := TBitmap.Create;
    9090  Back.PixelFormat := pf24bit;
    91   Back.Width := ClientWidth;
    92   Back.Height := ClientHeight;
     91  Back.SetSize(ClientWidth, ClientHeight);
     92  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    9393  Template := TBitmap.Create;
    9494  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Nation', gfNoGamma);
  • trunk/LocalPlayer/Select.pas

    r38 r40  
    108108  ScienceNationDot := TBitmap.Create;
    109109  ScienceNationDot.PixelFormat := pf24bit;
    110   ScienceNationDot.Width := 17;
    111   ScienceNationDot.Height := 17;
     110  ScienceNationDot.SetSize(17, 17);
     111  ScienceNationDot.Canvas.FillRect(0, 0, ScienceNationDot.Width, ScienceNationDot.Height);
    112112end;
    113113
  • trunk/LocalPlayer/UnitStat.lfm

    r9 r40  
    11object UnitStatDlg: TUnitStatDlg
    22  Left = 344
     3  Height = 326
    34  Top = 213
     5  Width = 208
    46  BorderStyle = bsNone
    57  ClientHeight = 326
    68  ClientWidth = 208
    79  Color = clBtnFace
    8   Font.Charset = DEFAULT_CHARSET
    910  Font.Color = clWindowText
    1011  Font.Height = -13
    1112  Font.Name = 'MS Sans Serif'
    12   Font.Style = []
    1313  FormStyle = fsStayOnTop
    1414  OnClose = FormClose
     
    1616  OnDestroy = FormDestroy
    1717  OnShow = FormShow
    18   PixelsPerInch = 96
     18  LCLVersion = '1.6.2.0'
    1919  object SwitchBtn: TButtonB
    2020    Left = 12
     21    Height = 25
    2122    Top = 29
    2223    Width = 25
    23     Height = 25
    2424    Down = False
    2525    Permanent = False
     
    2929  object CloseBtn: TButtonB
    3030    Left = 177
     31    Height = 25
    3132    Top = 6
    3233    Width = 25
    33     Height = 25
    3434    Down = False
    3535    Permanent = False
     
    3939  object ConscriptsBtn: TButtonB
    4040    Left = 43
     41    Height = 25
    4142    Top = 29
    4243    Width = 25
    43     Height = 25
    4444    Down = False
    4545    Permanent = False
     
    4949  object HelpBtn: TButtonC
    5050    Left = 178
     51    Height = 12
    5152    Top = 145
    5253    Width = 12
    53     Height = 12
    5454    Down = False
    5555    Permanent = False
  • trunk/LocalPlayer/UnitStat.pas

    r38 r40  
    8080  Back := TBitmap.Create;
    8181  Back.PixelFormat := pf24bit;
    82   Back.Width := 5 * wCommon;
    83   Back.Height := hMax;
     82  Back.SetSize(5 * wCommon, hMax);
     83  Back.Canvas.FillRect(0, 0, Back.Width,Back.Height);
    8484  Template := TBitmap.Create;
    8585  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Unit', gfNoGamma);
  • trunk/ScreenTools.pas

    r39 r40  
    983983  yOffset: integer);
    984984begin
    985   assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
     985  Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
    986986    (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));
    987987  BitBlt(ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,
     
    10561056        Texture.Height - y0cut - y1cut, Texture.Canvas.Handle, x0cut,
    10571057        y0cut, SRCCOPY);
    1058     end
     1058    end;
    10591059  end;
    10601060end;
     
    11991199      i, r, g, b: integer;
    12001200    begin
    1201       with ca do
    12021201      begin
    12031202        for i := 0 to 15 do
     
    12181217          else if b >= 256 then
    12191218            b := 255;
    1220           Pen.Color := r + g shl 8 + b shl 16;
    1221           MoveTo(x + dx * i, y + dy * i);
    1222           LineTo(x + dx * i + Width, y + dy * i + Height);
     1219          ca.Pen.Color := r + g shl 8 + b shl 16;
     1220          ca.MoveTo(x + dx * i, y + dy * i);
     1221          ca.LineTo(x + dx * i + Width, y + dy * i + Height);
    12231222        end;
    1224         Pen.Color := $000000;
    1225         MoveTo(x + 1, y + 16 * dy + Height);
    1226         LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
    1227         LineTo(x + 16 * dx + Width, y);
     1223        ca.Pen.Color := $000000;
     1224        ca.MoveTo(x + 1, y + 16 * dy + Height);
     1225        ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
     1226        ca.LineTo(x + 16 * dx + Width, y);
    12281227      end
    12291228    end;
  • trunk/Start.pas

    r38 r40  
    374374  EmptyPicture := TBitmap.Create;
    375375  EmptyPicture.PixelFormat := pf24bit;
    376   EmptyPicture.width := 64;
    377   EmptyPicture.height := 64;
     376  EmptyPicture.SetSize(64, 64);
     377  EmptyPicture.Canvas.FillRect(0, 0, EmptyPicture.Width, EmptyPicture.Height);
    378378  LogoBuffer := TBitmap.Create;
    379379  LogoBuffer.PixelFormat := pf24bit;
    380   LogoBuffer.width := wBuffer;
    381   LogoBuffer.height := 56;
     380  LogoBuffer.SetSize(wBuffer, 56);
     381  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    382382
    383383  Mini := TBitmap.Create;
Note: See TracChangeset for help on using the changeset viewer.