Changeset 179


Ignore:
Timestamp:
Jun 23, 2019, 9:12:54 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved scaling support.
Location:
branches/highdpi
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Back.pas

    r178 r179  
    6565begin
    6666  if Assigned(Img) then
    67     BitBlt(Canvas.Handle, Screen.Width - Img.Width - (Screen.Width - 800) *
     67    DpiBitBlt(Canvas.Handle, Screen.Width - Img.Width - (Screen.Width - 800) *
    6868      3 div 8, (Screen.Height - 600) div 3, Img.Width, Img.Height,
    6969      Img.Canvas.Handle, 0, 0, SRCCOPY);
  • branches/highdpi/LocalPlayer/Battle.pas

    r178 r179  
    107107    VLightGradient(ca, xm - 8, ym + 8 + LABaseDamage, LADamage - LABaseDamage,
    108108      FanaticColor);
    109   BitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
     109  DpiBitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
    110110    GrExt[HGrSystem].Mask.Canvas.Handle, 26, 146, SRCAND);
    111   BitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
     111  DpiBitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
    112112    GrExt[HGrSystem].Data.Canvas.Handle, 26, 146, SRCPAINT);
    113113
     
    132132  if Forecast.EndHealthDef <= 0 then
    133133  begin
    134     BitBlt(ca.Handle, xm + 9 + LDDamage - 7, ym - 6, 14, 17,
     134    DpiBitBlt(ca.Handle, xm + 9 + LDDamage - 7, ym - 6, 14, 17,
    135135      GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    136     BitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
     136    DpiBitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
    137137      GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    138     BitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
     138    DpiBitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
    139139      GrExt[HGrSystem].Data.Canvas.Handle, 51, 153, SRCPAINT);
    140140  end;
     
    152152  if Forecast.EndHealthAtt <= 0 then
    153153  begin
    154     BitBlt(ca.Handle, xm - 6, ym + 9 + LADamage - 7, 14, 17,
     154    DpiBitBlt(ca.Handle, xm - 6, ym + 9 + LADamage - 7, 14, 17,
    155155      GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    156     BitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
     156    DpiBitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
    157157      GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    158     BitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
     158    DpiBitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
    159159      GrExt[HGrSystem].Data.Canvas.Handle, 51, 153, SRCPAINT);
    160160  end;
     
    173173
    174174  NoMap.SetOutput(Buffer);
    175   BitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm + 8 + 4,
     175  DpiBitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm + 8 + 4,
    176176    ym - 8 - 12 - 48, SRCCOPY);
    177177  { if TerrType<fForest then
     
    185185    end; }
    186186  NoMap.PaintUnit(1, 0, UnitInfo, 0);
    187   BitBlt(ca.Handle, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas.Handle,
     187  DpiBitBlt(ca.Handle, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas.Handle,
    188188    0, 0, SRCCOPY);
    189189
    190   BitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm - 8 - 4 - 66,
     190  DpiBitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm - 8 - 4 - 66,
    191191    ym + 8 + 12, SRCCOPY);
    192192  MakeUnitInfo(me, MyUn[uix], UnitInfo);
    193193  UnitInfo.Flags := UnitInfo.Flags and not unFortified;
    194194  NoMap.PaintUnit(1, 0, UnitInfo, 0);
    195   BitBlt(ca.Handle, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas.Handle,
     195  DpiBitBlt(ca.Handle, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas.Handle,
    196196    0, 0, SRCCOPY);
    197197end; { PaintBattleOutcome }
  • branches/highdpi/LocalPlayer/CityScreen.pas

    r178 r179  
    260260    Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight);
    261261
    262     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     262    Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    263263      MainTexture.Image.Canvas.Handle, 0, 0, SRCCOPY);
    264264    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
     
    291291  Color2 := Colors.Canvas.Pixels[clkAge0 + Age, cliHouse];
    292292  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    293   bitblt(SmallCityMap.Canvas.Handle, 0, 0, 83, hSmallMap,
     293  Dpibitblt(SmallCityMap.Canvas.Handle, 0, 0, 83, hSmallMap,
    294294    SmallCityMapTemplate.Canvas.Handle, 83 * SizeClass, 0, SRCCOPY);
    295295  if IsPort then
    296296  begin
    297     bitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
     297    Dpibitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
    298298      SmallCityMapTemplate.Canvas.Handle, 332 + 15, 0, SRCCOPY);
    299299    ImageOp_CCC(SmallCityMap, 0, 0, 83, hSmallMap, Color0, Color1, Color2);
     
    303303  else
    304304  begin
    305     bitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
     305    Dpibitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
    306306      SmallCityMapTemplate.Canvas.Handle, 332, 0, SRCCOPY);
    307307    ImageOp_CCC(SmallCityMap, 0, 0, wSmallMap, hSmallMap, Color0,
     
    359359  ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
    360360
    361   bitblt(ZoomCityMap.Canvas.Handle, 0, 0, wZoomMap, hZoomMap,
     361  Dpibitblt(ZoomCityMap.Canvas.Handle, 0, 0, wZoomMap, hZoomMap,
    362362    Back.Canvas.Handle, xZoomMap, yZoomMap, SRCCOPY);
    363363  if Mode = mImp then begin
     
    542542  RedTex.clTextShade := $0000FF;
    543543
    544   bitblt(offscreen.Canvas.Handle, 0, 0, 640, 480, Back.Canvas.Handle, 0,
     544  Dpibitblt(offscreen.Canvas.Handle, 0, 0, 640, 480, Back.Canvas.Handle, 0,
    545545    0, SRCCOPY);
    546546
     
    614614    false, AllowChange and IsCityAlive and
    615615    (c.Status and csResourceWeightsMask = 0));
    616   bitblt(offscreen.Canvas.Handle, xmArea + 102, 42, 90, 33, Back.Canvas.Handle,
     616  Dpibitblt(offscreen.Canvas.Handle, xmArea + 102, 42, 90, 33, Back.Canvas.Handle,
    617617    xmArea + 102, 42, SRCCOPY);
    618618
     
    645645    else
    646646      xGr := 141;
    647     bitblt(offscreen.Canvas.Handle, xmArea - 192 + 5 + i * d, ymArea - 96 - 29,
     647    Dpibitblt(offscreen.Canvas.Handle, xmArea - 192 + 5 + i * d, ymArea - 96 - 29,
    648648      27, 30, GrExt[HGrSystem].Mask.Canvas.Handle, xGr, 171, SRCAND); { shadow }
    649649    Sprite(offscreen, HGrSystem, xmArea - 192 + 4 + i * d, ymArea - 96 - 30, 27,
     
    657657  begin
    658658    xGr := 1 + 112;
    659     bitblt(offscreen.Canvas.Handle, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27,
     659    Dpibitblt(offscreen.Canvas.Handle, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27,
    660660      30, GrExt[HGrSystem].Mask.Canvas.Handle, xGr, 171, SRCAND); { shadow }
    661661    Sprite(offscreen, HGrSystem, xmArea + 192 - 27 - i * d, 29, 27, 30,
     
    803803
    804804  // small map
    805   bitblt(offscreen.Canvas.Handle, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
     805  Dpibitblt(offscreen.Canvas.Handle, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
    806806    SmallCityMap.Canvas.Handle, 0, 0, SRCCOPY);
    807807  if Mode = mImp then
     
    831831  Sprite(offscreen, HGrSystem, x + 6, y - 5, 10, 10, 154, 126);
    832832
    833   bitblt(offscreen.Canvas.Handle, xZoomMap, yZoomMap, wZoomMap, hZoomMap,
     833  Dpibitblt(offscreen.Canvas.Handle, xZoomMap, yZoomMap, wZoomMap, hZoomMap,
    834834    ZoomCityMap.Canvas.Handle, 0, 0, SRCCOPY);
    835835
     
    16201620      with Canvas do
    16211621      begin
    1622         bitblt(Canvas.Handle, xView + 5, yView + 1, 64, 2, Back.Canvas.Handle,
     1622        Dpibitblt(Canvas.Handle, xView + 5, yView + 1, 64, 2, Back.Canvas.Handle,
    16231623          xView + 5, yView + 1, SRCCOPY);
    1624         bitblt(Canvas.Handle, xView + 5, yView + 3, 2, 42, Back.Canvas.Handle,
     1624        Dpibitblt(Canvas.Handle, xView + 5, yView + 3, 2, 42, Back.Canvas.Handle,
    16251625          xView + 5, yView + 3, SRCCOPY);
    1626         bitblt(Canvas.Handle, xView + 5 + 62, yView + 3, 2, 42,
     1626        Dpibitblt(Canvas.Handle, xView + 5 + 62, yView + 3, 2, 42,
    16271627          Back.Canvas.Handle, xView + 5 + 62, yView + 3, SRCCOPY);
    16281628        ScreenTools.Frame(Canvas, xView + 9 - 1, yView + 5 - 1, xView + 9 + xSizeBig,
     
    16441644      else if c.Project and cpImp = 0 then
    16451645      begin // project is unit
    1646         bitblt(Canvas.Handle, xView + 9, yView + 5, xSizeBig, ySizeBig,
     1646        Dpibitblt(Canvas.Handle, xView + 9, yView + 5, xSizeBig, ySizeBig,
    16471647          bigimp.Canvas.Handle, 0, 0, SRCCOPY);
    16481648        with Tribe[cOwner].ModelPicture[c.Project and cpIndex] do
  • branches/highdpi/LocalPlayer/CityType.pas

    r57 r179  
    3939  CityTypeDlg: TCityTypeDlg;
    4040
     41
    4142implementation
    4243
    43 uses Help;
     44uses
     45  Help, UDpiControls;
    4446
    4547{$R *.lfm}
     
    114116        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    115117        MainTexture.clBevelShade);
    116     BitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2,
     118    DpiBitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2,
    117119      xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle, (i + 3) * xSizeSmall,
    118120      0, SRCCOPY)
     
    149151      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    150152      MainTexture.clBevelLight, MainTexture.clBevelShade);
    151     BitBlt(offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +
     153    DpiBitBlt(offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +
    152154      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
    153155      xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     
    172174        nPool div nPoolCol * 32, MainTexture.clBevelLight,
    173175        MainTexture.clBevelShade);
    174       BitBlt(offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +
     176      DpiBitBlt(offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +
    175177        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
    176178        nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
  • branches/highdpi/LocalPlayer/Draft.pas

    r178 r179  
    238238  // assemble background from 2 texture tiles
    239239  begin
    240     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, 64,
     240    Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, 64,
    241241      MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    242242      hMainTexture - 64, SRCCOPY);
    243     bitblt(Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,
     243    Dpibitblt(Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,
    244244      MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    245245      0, SRCCOPY);
    246246  end
    247247  else
    248     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     248    Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    249249      MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    250250      (hMainTexture - ClientHeight) div 2, SRCCOPY);
     
    253253    Template.Height - 64 - Cut);
    254254
    255   bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     255  Dpibitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    256256    Back.Canvas.Handle, 0, 0, SRCCOPY);
    257257
  • branches/highdpi/LocalPlayer/Enhance.pas

    r57 r179  
    4545  EnhanceDlg: TEnhanceDlg;
    4646
     47
    4748implementation
    4849
    49 uses Help;
     50uses
     51  Help, UDpiControls;
    5052
    5153{$R *.lfm}
     
    9698  for i := 0 to ControlCount - 1 do
    9799    if Controls[i] is TButtonC then
    98       BitBlt(Canvas.Handle, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8,
     100      DpiBitBlt(Canvas.Handle, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8,
    99101        GrExt[HGrSystem].Data.Canvas.Handle, 121 + Controls[i].Tag mod 7 * 9,
    100102        1 + Controls[i].Tag div 7 * 9, SRCCOPY);
  • branches/highdpi/LocalPlayer/Help.pas

    r178 r179  
    315315      ca.FrameRect(rect(x+1,i*24+1,x+24-1,i*24+24-1));
    316316      ca.Brush.Style:=bsClear; }
    317     BitBlt(ca.Handle, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas.Handle, 1,
     317    DpiBitBlt(ca.Handle, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas.Handle, 1,
    318318      146, SRCCOPY);
    319319    BiColorTextOut(ca, $FFFFFF, $7F007F, x + 10 - ca.Textwidth(s[1]) div 2,
     
    456456          if 4 + i * 24 + yl > InnerHeight then
    457457            yl := InnerHeight - (4 + i * 24);
    458           BitBlt(Handle, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas.Handle,
     458          DpiBitBlt(Handle, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas.Handle,
    459459            0, 0, SRCCOPY);
    460460        end;
     
    497497                8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000);
    498498              if HelpLineInfo.Picpix = imPalace then
    499                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
     499                DpiBitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    500500                  xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    501501                  0 * xSizeSmall, 1 * ySizeSmall, SRCCOPY)
    502502              else
    503                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
     503                DpiBitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    504504                  xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    505505                  HelpLineInfo.Picpix mod 7 * xSizeSmall,
     
    564564                $000000, $000000);
    565565              if AdvIcon[HelpLineInfo.Picpix] < 84 then
    566                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
     566                DpiBitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    567567                  xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    568568                  (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines * 7) mod 7 *
     
    574574                  295 + (AdvIcon[HelpLineInfo.Picpix] - 84) div 8 * 21);
    575575              j := AdvValue[HelpLineInfo.Picpix] div 1000;
    576               BitBlt(Handle, x0[i] + 4, 4 + i * 24, 14, 14,
     576              DpiBitBlt(Handle, x0[i] + 4, 4 + i * 24, 14, 14,
    577577                GrExt[HGrSystem].Mask.Canvas.Handle, 127 + j * 15, 85, SRCAND);
    578578              Sprite(OffScreen, HGrSystem, x0[i] + 3, 3 + i * 24, 14, 14,
     
    751751              ScreenTools.Frame(OffScreen.Canvas, 8 - 1 + x0[i], 2 - 1 + i * 24,
    752752                8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000);
    753               BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24, xSizeSmall,
     753              DpiBitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24, xSizeSmall,
    754754                ySizeSmall, SmallImp.Canvas.Handle, (HelpLineInfo.Picpix - 1) *
    755755                xSizeSmall, ySizeSmall, SRCCOPY);
  • branches/highdpi/LocalPlayer/IsoEngine.pas

    r178 r179  
    521521    exit;
    522522
    523   LCLIntf.BitBlt(FOutput.Canvas.Handle, x, y, Width, Height, Src.Canvas.Handle,
     523  DpiBitBlt(FOutput.Canvas.Handle, x, y, Width, Height, Src.Canvas.Handle,
    524524    xSrc, ySrc, Rop);
    525525end;
     
    561561    exit;
    562562
    563   LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, MaskDC, xSrc, ySrc, SRCAND);
     563  DpiBitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, MaskDC, xSrc, ySrc, SRCAND);
    564564  if not PureBlack then
    565     LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, DataDC, xSrc, ySrc,
     565    DpiBitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, DataDC, xSrc, ySrc,
    566566      SRCPAINT);
    567567end;
     
    10111011          Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2));
    10121012
    1013           LCLIntf.BitBlt(Borders.Canvas.Handle, 0, p1 * (yyt * 2), xxt * 2,
     1013          DpiBitBlt(Borders.Canvas.Handle, 0, p1 * (yyt * 2), xxt * 2,
    10141014            yyt * 2, GrExt[HGrTerrain].Data.Canvas.Handle,
    10151015            1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1), SRCCOPY);
  • branches/highdpi/LocalPlayer/MessgEx.pas

    r178 r179  
    304304  ImageOp_BCC(LogoBuffer, Templates, 0, 0, xb, yb, wb, hb, clCover, clPage);
    305305
    306   BitBlt(ca.Handle, x, y, wb, hb, LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     306  DpiBitBlt(ca.Handle, x, y, wb, hb, LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
    307307end;
    308308
     
    328328      with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do
    329329      begin
    330         BitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Mask.Canvas.Handle,
     330        DpiBitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Mask.Canvas.Handle,
    331331          pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND);
    332         BitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Data.Canvas.Handle,
     332        DpiBitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Data.Canvas.Handle,
    333333          pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT);
    334334      end;
     
    371371      begin
    372372        p1 := MyRO.Wonder[IconIndex].EffectiveOwner;
    373         BitBlt(Buffer.Canvas.Handle, 0, 0, xSizeBig + 2 * GlowRange,
     373        DpiBitBlt(Buffer.Canvas.Handle, 0, 0, xSizeBig + 2 * GlowRange,
    374374          ySizeBig + 2 * GlowRange, Canvas.Handle,
    375375          ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange, SRCCOPY);
    376         BitBlt(Buffer.Canvas.Handle, GlowRange, GlowRange, xSizeBig, ySizeBig,
     376        DpiBitBlt(Buffer.Canvas.Handle, GlowRange, GlowRange, xSizeBig, ySizeBig,
    377377          BigImp.Canvas.Handle, IconIndex mod 7 * xSizeBig,
    378378          (IconIndex + SystemIconLines * 7) div 7 * ySizeBig, SRCCOPY);
     
    382382          GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig,
    383383            Tribe[p1].Color);
    384         BitBlt(Canvas.Handle, ClientWidth div 2 - (28 + GlowRange),
     384        DpiBitBlt(Canvas.Handle, ClientWidth div 2 - (28 + GlowRange),
    385385          24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange,
    386386          Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     
    400400        FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig,
    401401          ySizeBig, 0, 0);
    402         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
     402        DpiBitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
    403403          GrExt[HGr].Mask.Canvas.Handle, pix mod 10 * 65 + 1,
    404404          pix div 10 * 49 + 1, SRCAND);
    405         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
     405        DpiBitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
    406406          GrExt[HGr].Data.Canvas.Handle, pix mod 10 * 65 + 1,
    407407          pix div 10 * 49 + 1, SRCPAINT);
     
    415415        Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1,
    416416          ClientWidth div 2 + 32, 24 + 48, $000000, $000000);
    417         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 24, 64, 48,
     417        DpiBitBlt(Canvas.Handle, ClientWidth div 2 - 32, 24, 64, 48,
    418418          GrExt[Tribe[IconIndex].faceHGr].Data.Canvas.Handle,
    419419          1 + Tribe[IconIndex].facepix mod 10 * 65,
     
    432432          (ClientWidth - 140) div 2, 24, SRCCOPY);
    433433        ImageOp_BCC(Buffer, Templates, 0, 0, 1, 279, 140, 120, 0, $FFFFFF);
    434         BitBlt(Canvas.Handle, (ClientWidth - 140) div 2, 24, 140, 120,
     434        DpiBitBlt(Canvas.Handle, (ClientWidth - 140) div 2, 24, 140, 120,
    435435          Buffer.Canvas.Handle, 0, 0, SRCCOPY);
    436436      end;
  • branches/highdpi/LocalPlayer/NatStat.pas

    r178 r179  
    108108  begin
    109109    AgePrepared := MainTextureAge;
    110     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     110    Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    111111      MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    112112      (hMainTexture - ClientHeight) div 2, SRCCOPY);
     
    263263  Extinct := 1 shl pView and MyRO.Alive = 0;
    264264
    265   bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
     265  Dpibitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    266266    Back.Canvas.Handle, 0, 0, SRCCOPY);
    267267
  • branches/highdpi/LocalPlayer/Rates.pas

    r61 r179  
    2929  RatesDlg: TRatesDlg;
    3030
     31
    3132implementation
    3233
    3334uses
    34   ClientTools, Term, Tribes;
     35  ClientTools, Term, Tribes, UDpiControls;
    3536
    3637{$R *.lfm}
     
    9596    GlowFrame(Offscreen, ClientWidth div 2 - xSizeBig div 2, 52, xSizeBig,
    9697      ySizeBig, Tribe[me].Color);
    97     BitBlt(Offscreen.Canvas.Handle, ClientWidth div 2 - xSizeBig div 2, 52,
     98    DpiBitBlt(Offscreen.Canvas.Handle, ClientWidth div 2 - xSizeBig div 2, 52,
    9899      xSizeBig, ySizeBig, BigImp.Canvas.Handle, (woLiberty mod 7) * xSizeBig,
    99100      (woLiberty div 7 + SystemIconLines) * ySizeBig, SRCCOPY);
     
    122123    begin
    123124      for i := 0 to current div 8 - 1 do
    124         BitBlt(Handle, x + max - 8 - i * 8, y, 8, 7,
     125        DpiBitBlt(Handle, x + max - 8 - i * 8, y, 8, 7,
    125126          GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * 2, SRCCOPY);
    126       BitBlt(Handle, x + max - current, y, current - 8 * (current div 8), 7,
     127      DpiBitBlt(Handle, x + max - current, y, current - 8 * (current div 8), 7,
    127128        GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * 2, SRCCOPY);
    128129      Brush.Color := $000000;
  • branches/highdpi/LocalPlayer/Select.pas

    r178 r179  
    196196      if pix and cpType = 0 then
    197197        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
    198           BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
     198          DpiBitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    199199            ySizeSmall, SmallImp.Canvas.Handle, (MyRO.Government - 1) *
    200200            xSizeSmall, ySizeSmall, SRCCOPY)
    201201        else
    202           BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
     202          DpiBitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    203203            ySizeSmall, SmallImp.Canvas.Handle, pix and cpIndex mod 7 *
    204204            xSizeSmall, (pix and cpIndex + SystemIconLines * 7) div 7 *
    205205            ySizeSmall, SRCCOPY)
    206206      else
    207         BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
     207        DpiBitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    208208          ySizeSmall, SmallImp.Canvas.Handle, (3 + pix and cpIndex) *
    209209          xSizeSmall, 0, SRCCOPY)
     
    567567                  MainTexture.clBevelLight, MainTexture.clBevelShade);
    568568                if AdvIcon[lix] < 84 then
    569                   BitBlt(offscreen.Canvas.Handle, (8 + 16), y0, xSizeSmall,
     569                  DpiBitBlt(offscreen.Canvas.Handle, (8 + 16), y0, xSizeSmall,
    570570                    ySizeSmall, SmallImp.Canvas.Handle,
    571571                    (AdvIcon[lix] + SystemIconLines * 7) mod 7 * xSizeSmall,
     
    577577                    295 + (AdvIcon[lix] - 84) div 8 * 21);
    578578                j := AdvValue[lix] div 1000;
    579                 BitBlt(Handle, (8 + 16 - 4), y0 + 2, 14, 14,
     579                DpiBitBlt(Handle, (8 + 16 - 4), y0 + 2, 14, 14,
    580580                  GrExt[HGrSystem].Mask.Canvas.Handle, 127 + j * 15,
    581581                  85, SRCAND);
     
    672672              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    673673              MainTexture.clBevelLight, MainTexture.clBevelShade);
    674             BitBlt(offscreen.Canvas.Handle, 8 + 16, y0 - 15 + (16 - 1),
     674            DpiBitBlt(offscreen.Canvas.Handle, 8 + 16, y0 - 15 + (16 - 1),
    675675              xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    676676              (lix - 1) * xSizeSmall, ySizeSmall, SRCCOPY);
     
    819819        ImageOp_BCC(ScienceNationDot, Templates, 0, 0, 114, 211, 17, 17,
    820820          MainTexture.clBevelShade, Tribe[ScienceNation].Color);
    821         BitBlt(Canvas.Handle, xScreen - 10, ClientHeight - 27, 17, 17,
     821        DpiBitBlt(Canvas.Handle, xScreen - 10, ClientHeight - 27, 17, 17,
    822822          ScienceNationDot.Canvas.Handle, 0, 0, SRCCOPY);
    823823      end;
  • branches/highdpi/LocalPlayer/TechTree.pas

    r178 r179  
    107107        -BlackBorder - yOffset, Paper);
    108108  end;
    109   BitBlt(Canvas.Handle, max(BlackBorder, BlackBorder + xOffset),
     109  DpiBitBlt(Canvas.Handle, max(BlackBorder, BlackBorder + xOffset),
    110110    max(BlackBorder, BlackBorder + yOffset),
    111111    min(Image.width, min(Image.width + xOffset,
  • branches/highdpi/LocalPlayer/Term.pas

    r178 r179  
    27462746          begin
    27472747            if AILogo[pLogo] <> nil then
    2748               BitBlt(Canvas.Handle, (xRightPanel + 10) - (16 + 64),
     2748              DpiBitBlt(Canvas.Handle, (xRightPanel + 10) - (16 + 64),
    27492749                ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas.Handle,
    27502750                0, 0, SRCCOPY);
     
    40424042  begin
    40434043    if xMap < 0 then
    4044       BitBlt(Canvas.Handle, MapOffset, TopBarHeight, width + xMap,
     4044      DpiBitBlt(Canvas.Handle, MapOffset, TopBarHeight, width + xMap,
    40454045        height + yMap, Buffer.Canvas.Handle, -xMap, -yMap, SRCCOPY)
    40464046    else
    4047       BitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight, width,
     4047      DpiBitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight, width,
    40484048        height + yMap, Buffer.Canvas.Handle, 0, -yMap, SRCCOPY)
    40494049  end
     
    40514051  begin
    40524052    if xMap < 0 then
    4053       BitBlt(Canvas.Handle, MapOffset, TopBarHeight + yMap, width + xMap,
     4053      DpiBitBlt(Canvas.Handle, MapOffset, TopBarHeight + yMap, width + xMap,
    40544054        height, Buffer.Canvas.Handle, -xMap, 0, SRCCOPY)
    40554055    else
    4056       BitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight + yMap, width,
     4056      DpiBitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight + yMap, width,
    40574057        height, Buffer.Canvas.Handle, 0, 0, SRCCOPY);
    40584058  end
     
    43254325procedure TMainScreen.CopyMiniToPanel;
    43264326begin
    4327   BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     4327  DpiBitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    43284328    Mini.Canvas.Handle, 0, 0, SRCCOPY);
    43294329  if MarkCityLoc >= 0 then
     
    44144414          ClientWidth - xPalace + xSizeBig + 1, yPalace + ySizeBig + 1,
    44154415          $FFFFFF, $B0B0B0);
    4416         BitBlt(Panel.Canvas.Handle, ClientWidth - xPalace, yPalace, xSizeBig,
     4416        DpiBitBlt(Panel.Canvas.Handle, ClientWidth - xPalace, yPalace, xSizeBig,
    44174417          ySizeBig, GrExt[HGrSystem2].Data.Canvas.Handle, 70, 123, SRCCOPY);
    44184418      end
     
    52725272      PaintLoc(MouseLoc, 2);
    52735273      MiniPaint;
    5274       BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     5274      DpiBitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    52755275        Mini.Canvas.Handle, 0, 0, SRCCOPY);
    52765276      if ywmax <= 0 then
     
    60966096    for Step := 0 to abs(Step1 - Step0) do
    60976097    begin
    6098       BitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange,
     6098      DpiBitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange,
    60996099        offscreen.Canvas.Handle, xMin, yMin, SRCCOPY);
    61006100      if Step1 <> Step0 then
     
    61386138  if Restore then
    61396139  begin
    6140     BitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange, offscreen.Canvas.Handle,
     6140    DpiBitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange, offscreen.Canvas.Handle,
    61416141      xMin, yMin, SRCCOPY);
    61426142    PaintBufferToScreen(xMin, yMin, xRange, yRange);
     
    74897489  InitPopup(Popup);
    74907490  if FullScreen then
    7491     Popup.Popup(Left + TControl(Sender).Left, Top + TControl(Sender).Top)
     7491    Popup.Popup(Left + TDpiControl(Sender).Left, Top + TDpiControl(Sender).Top)
    74927492  else
    7493     Popup.Popup(Left + TControl(Sender).Left + 4, Top + TControl(Sender).Top +
     7493    Popup.Popup(Left + TDpiControl(Sender).Left + 4, Top + TDpiControl(Sender).Top +
    74947494      GetSystemMetrics(SM_CYCAPTION) + 4);
    74957495end;
     
    75537553          yw := ywmax;
    75547554      end;
    7555       BitBlt(Buffer.Canvas.Handle, 0, 0, G.lx * 2, G.ly, Mini.Canvas.Handle, 0,
     7555      DpiBitBlt(Buffer.Canvas.Handle, 0, 0, G.lx * 2, G.ly, Mini.Canvas.Handle, 0,
    75567556        0, SRCCOPY);
    75577557      if ywmax <= 0 then
     
    75637563          x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt -
    75647564          2, MainTexture.clMark, MainTexture.clMark);
    7565       BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     7565      DpiBitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    75667566        Buffer.Canvas.Handle, 0, 0, SRCCOPY);
    75677567      MainOffscreenPaint;
     
    77157715      Brush.Style := bsClear;
    77167716    end;
    7717   BitBlt(Canvas.Handle, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
     7717  DpiBitBlt(Canvas.Handle, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
    77187718    offscreen.Canvas.Handle, 0, 0, SRCCOPY);
    7719   BitBlt(Canvas.Handle, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas.Handle,
     7719  DpiBitBlt(Canvas.Handle, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas.Handle,
    77207720    0, 0, SRCCOPY);
    77217721  if xMidPanel > MapOffset then
    7722     BitBlt(Canvas.Handle, xMidPanel, TopBarHeight + MapHeight - overlap,
     7722    DpiBitBlt(Canvas.Handle, xMidPanel, TopBarHeight + MapHeight - overlap,
    77237723      ClientWidth div 2 - xMidPanel, overlap, offscreen.Canvas.Handle,
    77247724      xMidPanel - MapOffset, MapHeight - overlap, SRCCOPY)
    77257725  else
    7726     BitBlt(Canvas.Handle, MapOffset, TopBarHeight + MapHeight - overlap,
     7726    DpiBitBlt(Canvas.Handle, MapOffset, TopBarHeight + MapHeight - overlap,
    77277727      ClientWidth div 2 - MapOffset, overlap, offscreen.Canvas.Handle, 0,
    77287728      MapHeight - overlap, SRCCOPY);
    77297729  if xRightPanel < MapOffset + MapWidth then
    7730     BitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
     7730    DpiBitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
    77317731      xRightPanel - ClientWidth div 2, overlap, offscreen.Canvas.Handle,
    77327732      ClientWidth div 2 - MapOffset, MapHeight - overlap, SRCCOPY)
    77337733  else
    7734     BitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
     7734    DpiBitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
    77357735      MapOffset + MapWidth - ClientWidth div 2, overlap,
    77367736      offscreen.Canvas.Handle, ClientWidth div 2 - MapOffset,
    77377737      MapHeight - overlap, SRCCOPY);
    7738   BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight - overlap, xMidPanel,
     7738  DpiBitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight - overlap, xMidPanel,
    77397739    overlap, Panel.Canvas.Handle, 0, 0, SRCCOPY);
    7740   BitBlt(Canvas.Handle, xRightPanel, TopBarHeight + MapHeight - overlap,
     7740  DpiBitBlt(Canvas.Handle, xRightPanel, TopBarHeight + MapHeight - overlap,
    77417741    Panel.width - xRightPanel, overlap, Panel.Canvas.Handle, xRightPanel,
    77427742    0, SRCCOPY);
    7743   BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight, Panel.width,
     7743  DpiBitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight, Panel.width,
    77447744    PanelHeight - overlap, Panel.Canvas.Handle, 0, overlap, SRCCOPY);
    77457745  if (pLogo >= 0) and (G.RO[pLogo] = nil) and (AILogo[pLogo] <> nil) then
    7746     BitBlt(Canvas.Handle, xRightPanel + 10 - (16 + 64),
     7746    DpiBitBlt(Canvas.Handle, xRightPanel + 10 - (16 + 64),
    77477747      ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas.Handle, 0,
    77487748      0, SRCCOPY);
     
    77537753  r0: HRgn;
    77547754begin
    7755   r0 := CreateRectRgn(Left, Top, Rigth, Bottom);
     7755  r0 := DpiCreateRectRgn(Left, Top, Rigth, Bottom);
    77567756  InvalidateRgn(Handle, r0, false);
    77577757  DeleteObject(r0);
     
    77637763  r0, r1: HRgn;
    77647764begin
    7765   r0 := CreateRectRgn(Left, Top, Rigth, Bottom);
     7765  r0 := DpiCreateRectRgn(Left, Top, Rigth, Bottom);
    77667766  for i := 0 to ControlCount - 1 do
    77677767    if not(Controls[i] is TArea) and Controls[i].Visible then
    77687768    begin
    77697769      with Controls[i].BoundsRect do
    7770         r1 := CreateRectRgn(Left, Top, Right, Bottom);
     7770        r1 := DpiCreateRectRgn(Left, Top, Right, Bottom);
    77717771      CombineRgn(r0, r0, r1, RGN_DIFF);
    77727772      DeleteObject(r1);
  • branches/highdpi/LocalPlayer/UnitStat.pas

    r178 r179  
    9797  begin
    9898    AgePrepared := MainTextureAge;
    99     bitblt(Back.Canvas.Handle, 0, 0, wCommon, hOwnModel,
     99    Dpibitblt(Back.Canvas.Handle, 0, 0, wCommon, hOwnModel,
    100100      MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    101101      (hMainTexture - hOwnModel) div 2, SRCCOPY);
    102     bitblt(Back.Canvas.Handle, wCommon, 0, wCommon, hEnemyModel,
     102    Dpibitblt(Back.Canvas.Handle, wCommon, 0, wCommon, hEnemyModel,
    103103      MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    104104      (hMainTexture - hEnemyModel) div 2, SRCCOPY);
    105     bitblt(Back.Canvas.Handle, 2 * wCommon, 0, wCommon, hEnemyUnit,
     105    Dpibitblt(Back.Canvas.Handle, 2 * wCommon, 0, wCommon, hEnemyUnit,
    106106      MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    107107      (hMainTexture - hEnemyUnit) div 2, SRCCOPY);
    108     bitblt(Back.Canvas.Handle, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
     108    Dpibitblt(Back.Canvas.Handle, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
    109109      MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    110110      (hMainTexture - hEnemyCityDefense) div 2, SRCCOPY);
    111     bitblt(Back.Canvas.Handle, 4 * wCommon, 0, wCommon, hEnemyCity,
     111    Dpibitblt(Back.Canvas.Handle, 4 * wCommon, 0, wCommon, hEnemyCity,
    112112      MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    113113      (hMainTexture - hEnemyCity) div 2, SRCCOPY);
     
    387387    dkOwnModel:
    388388      begin
    389         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hOwnModel,
     389        Dpibitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hOwnModel,
    390390          Back.Canvas.Handle, 0, 0, SRCCOPY);
    391391        yView := 13;
     
    394394    dkEnemyModel:
    395395      begin
    396         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyModel,
     396        Dpibitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyModel,
    397397          Back.Canvas.Handle, wCommon, 0, SRCCOPY);
    398398        yView := 13;
     
    401401    dkEnemyUnit, dkOwnUnit:
    402402      begin
    403         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyUnit,
     403        Dpibitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyUnit,
    404404          Back.Canvas.Handle, 2 * wCommon, 0, SRCCOPY);
    405405        yView := 13;
     
    408408    dkEnemyCityDefense:
    409409      begin
    410         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCityDefense,
     410        Dpibitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCityDefense,
    411411          Back.Canvas.Handle, 3 * wCommon, 0, SRCCOPY);
    412412        yView := 171;
     
    415415    dkEnemyCity:
    416416      begin
    417         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCity,
     417        Dpibitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCity,
    418418          Back.Canvas.Handle, 4 * wCommon, 0, SRCCOPY);
    419419      end;
     
    445445          yImp + ySizeSmall, MainTexture.clBevelLight,
    446446          MainTexture.clBevelShade);
    447         bitblt(offscreen.Canvas.Handle, x, yImp, xSizeSmall, ySizeSmall,
     447        Dpibitblt(offscreen.Canvas.Handle, x, yImp, xSizeSmall, ySizeSmall,
    448448          SmallImp.Canvas.Handle, j mod 7 * xSizeSmall,
    449449          (j + SystemIconLines * 7) div 7 * ySizeSmall, SRCCOPY);
     
    564564                    * (yyt * 3 + 1));
    565565              end;
    566           bitblt(offscreen.Canvas.Handle, xView, yView + 16, 64, 32,
     566          Dpibitblt(offscreen.Canvas.Handle, xView, yView + 16, 64, 32,
    567567            Buffer.Canvas.Handle, 1, 0, SRCCOPY);
    568568
  • branches/highdpi/LocalPlayer/Wonders.pas

    r178 r179  
    3838
    3939uses
    40   Term, ClientTools, Help, Tribes;
     40  Term, ClientTools, Help, Tribes, UDpiControls;
    4141
    4242{$R *.lfm}
     
    249249          begin
    250250            HaveWonder := True;
    251             BitBlt(Offscreen.Canvas.Handle,
     251            DpiBitBlt(Offscreen.Canvas.Handle,
    252252              Center.X - xSizeBig div 2 + RingPosition[I].X,
    253253              Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig,
     
    258258        begin
    259259          HaveWonder := True;
    260           BitBlt(Offscreen.Canvas.Handle,
     260          DpiBitBlt(Offscreen.Canvas.Handle,
    261261            Center.X - xSizeBig div 2 + RingPosition[I].X,
    262262            Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, ySizeBig,
  • branches/highdpi/NoTerm.pas

    r178 r179  
    127127  RisedTextOut(State.Canvas, 0, 0, Format(Phrases.Lookup('AIT_ROUND'), [Round])
    128128    + ' ' + TurnToString(G.RO[me].Turn));
    129   BitBlt(Canvas.Handle, 64, 287 + 138, 192, 20, State.Canvas.Handle, 0,
     129  DpiBitBlt(Canvas.Handle, 64, 287 + 138, 192, 20, State.Canvas.Handle, 0,
    130130    0, SRCCOPY);
    131131end;
     
    331331        yBrain[i] - 16, 64, 64, 0, 0);
    332332      if 1 shl i and G.RO[me].Alive = 0 then
    333         BitBlt(Canvas.Handle, xBrain[i], yBrain[i] - 16, 64, 64,
     333        DpiBitBlt(Canvas.Handle, xBrain[i], yBrain[i] - 16, 64, 64,
    334334          Shade.Canvas.Handle, 0, 0, SRCAND);
    335335      Sprite(Canvas, HGrSystem, xBrain[i] + 30 - 14, yBrain[i] + 53, 14,
  • branches/highdpi/Packages/CevoComponents/ButtonB.pas

    r178 r179  
    4444    if FGraphic <> nil then
    4545    begin
    46       BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169,
     46      DpiBitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169,
    4747        243 + 26 * Byte(FDown), SRCCOPY);
    4848      if FIndex >= 0 then
    4949      begin
    50         BitBlt(Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle,
     50        DpiBitBlt(Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle,
    5151          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCAND);
    52         BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle,
     52        DpiBitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle,
    5353          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCPAINT);
    5454      end
  • branches/highdpi/Packages/CevoComponents/ButtonBase.pas

    r178 r179  
    77
    88type
     9
     10  { TButtonBase }
     11
    912  TButtonBase = class(TDpiGraphicControl)
    1013  protected
     
    2427  private
    2528    Active: boolean;
     29    procedure SetGraphic(AValue: TDpiBitmap);
    2630  public
    2731    constructor Create(aOwner: TComponent); override;
    28     property Graphic: TDpiBitmap read FGraphic write FGraphic;
     32    property Graphic: TDpiBitmap read FGraphic write SetGraphic;
    2933    // property DownSound: string read FDownSound write FDownSound;
    3034    // property UpSound: string read FUpSound write FUpSound;
     
    119123end;
    120124
     125procedure TButtonBase.SetGraphic(AValue: TDpiBitmap);
     126begin
     127  if FGraphic = AValue then Exit;
     128  FGraphic := AValue;
     129end;
     130
    121131procedure TButtonBase.SetDown(x: boolean);
    122132begin
  • branches/highdpi/Packages/CevoComponents/ButtonC.pas

    r178 r179  
    44
    55uses
    6   ButtonBase,
    7   Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType, UDpiControls;
    87
    98type
     
    4140  with Canvas do
    4241    if FGraphic <> nil then
    43       BitBlt(Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,
     42      DpiBitBlt(Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,
    4443        169 + 13 * Byte(FDown), 159 + 13 * FIndex, SRCCOPY)
    4544    else
  • branches/highdpi/Packages/CevoComponents/ScreenTools.pas

    r178 r179  
    441441end;
    442442
     443procedure ResizeBitmap(Bitmap: TDpiBitmap; const NewWidth, NewHeight: Integer);
     444var
     445  Buffer: TDpiBitmap;
     446begin
     447  Buffer := TDpiBitmap.Create;
     448  try
     449    Buffer.SetSize(NewWidth, NewHeight);
     450    Buffer.Canvas.StretchDraw(Rect(0, 0, NewWidth, NewHeight), Bitmap);
     451    Bitmap.SetSize(NewWidth, NewHeight);
     452    Bitmap.Canvas.Draw(0, 0, Buffer);
     453  finally
     454    Buffer.Free;
     455  end;
     456end;
     457
    443458function LoadGraphicFile(bmp: TDpiBitmap; Path: string; Options: Integer): Boolean;
    444459var
     
    453468    try
    454469      jtex.LoadFromFile(Path);
     470      ResizeBitmap(jtex, ScaleToVcl(jtex.Width), ScaleToVcl(jtex.Height));
    455471    except
    456472      Result := False;
     
    471487    try
    472488      Png.LoadFromFile(Path);
     489      ResizeBitmap(Png, ScaleToVcl(Png.Width), ScaleToVcl(Png.Height));
    473490    except
    474491      Result := False;
     
    494511    try
    495512      bmp.LoadFromFile(Path);
     513      ResizeBitmap(bmp, ScaleToVcl(bmp.Width), ScaleToVcl(bmp.Height));
    496514    except
    497515      Result := False;
     
    580598procedure Dump(dst: TDpiBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    581599begin
    582   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
     600  DpiBitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    583601    GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCCOPY);
    584602end;
     
    764782procedure Sprite(Canvas: TDpiCanvas; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    765783begin
    766   BitBlt(Canvas.Handle, xDst, yDst, Width, Height,
     784  DpiBitBlt(Canvas.Handle, xDst, yDst, Width, Height,
    767785    GrExt[HGr].Mask.Canvas.Handle, xGr, yGr, SRCAND);
    768   BitBlt(Canvas.Handle, xDst, yDst, Width, Height,
     786  DpiBitBlt(Canvas.Handle, xDst, yDst, Width, Height,
    769787    GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT);
    770788end;
     
    772790procedure Sprite(dst: TDpiBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    773791begin
    774   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
     792  DpiBitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    775793    GrExt[HGr].Mask.Canvas.Handle, xGr, yGr, SRCAND);
    776   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
     794  DpiBitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    777795    GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT);
    778796end;
     
    866884  end else
    867885    Frame(ca, x - 1, y - 1, x + Width, y + Height, $000000, $000000);
    868   BitBlt(ca.Handle, x, y, Width, Height, Src.Canvas.Handle, xSrc, ySrc,
     886  DpiBitBlt(ca.Handle, x, y, Width, Height, Src.Canvas.Handle, xSrc, ySrc,
    869887    SRCCOPY);
    870888end;
     
    947965          $FF * intensity div $FF shl 16;
    948966      end;
    949   BitBlt(GrExt[HGrSystem].Mask.Canvas.Handle, 77, 47, 10, 10,
     967  DpiBitBlt(GrExt[HGrSystem].Mask.Canvas.Handle, 77, 47, 10, 10,
    950968    GrExt[HGrSystem].Mask.Canvas.Handle, 66, 47, SRCCOPY);
    951969end;
     
    955973  Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
    956974    (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));
    957   BitBlt(ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,
     975  DpiBitBlt(ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,
    958976    Left + xOffset, Top + yOffset, SRCCOPY);
    959977end;
     
    977995begin
    978996  for I := 0 to (x1 - xm) div wMainTexture - 1 do
    979     BitBlt(ca.Handle, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,
     997    DpiBitBlt(ca.Handle, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,
    980998      MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 + Band(I) *
    981999      (y1 - y0), SRCCOPY);
    982   BitBlt(ca.Handle, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,
     1000  DpiBitBlt(ca.Handle, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,
    9831001    x1 - (xm + ((x1 - xm) div wMainTexture) * wMainTexture), y1 - y0,
    9841002    MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 + Band(
    9851003    (x1 - xm) div wMainTexture) * (y1 - y0), SRCCOPY);
    9861004  for I := 0 to (xm - x0) div wMainTexture - 1 do
    987     BitBlt(ca.Handle, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,
     1005    DpiBitBlt(ca.Handle, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,
    9881006      MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 +
    9891007      Band(-I - 1) * (y1 - y0), SRCCOPY);
    990   BitBlt(ca.Handle, x0, y0, xm - ((xm - x0) div wMainTexture) *
     1008  DpiBitBlt(ca.Handle, x0, y0, xm - ((xm - x0) div wMainTexture) *
    9911009    wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas.Handle,
    9921010    ((xm - x0) div wMainTexture + 1) * wMainTexture - (xm - x0),
     
    10211039      if x1cut < 0 then
    10221040        x1cut := 0;
    1023       BitBlt(ca.Handle, x * Texture.Width + x0cut - xOffset,
     1041      DpiBitBlt(ca.Handle, x * Texture.Width + x0cut - xOffset,
    10241042        y * Texture.Height + y0cut - yOffset, Texture.Width - x0cut - x1cut,
    10251043        Texture.Height - y0cut - y1cut, Texture.Canvas.Handle, x0cut,
     
    10431061procedure Corner(ca: TDpiCanvas; x, y, Kind: Integer; const T: TTexture);
    10441062begin
    1045   { BitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Mask.Canvas.Handle,
     1063  { DpiBitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Mask.Canvas.Handle,
    10461064    T.xGr+29+Kind*9,T.yGr+89,SRCAND);
    1047     BitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Data.Canvas.Handle,
     1065    DpiBitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Data.Canvas.Handle,
    10481066    T.xGr+29+Kind*9,T.yGr+89,SRCPAINT); }
    10491067end;
     
    10531071  procedure PaintIcon(x, y, Kind: Integer);
    10541072  begin
    1055     BitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas.Handle,
     1073    DpiBitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas.Handle,
    10561074      66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCAND);
    1057     BitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas.Handle,
     1075    DpiBitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas.Handle,
    10581076      66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCPAINT);
    10591077  end;
     
    12771295      for i := 0 to val mod 10 - 1 do
    12781296      begin
    1279         BitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14,
     1297        DpiBitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14,
    12801298          14, GrExt[HGrSystem].Mask.Canvas.Handle, 67 + Kind mod 8 * 15,
    12811299          70 + Kind div 8 * 15, SRCAND);
     
    12851303      for i := 0 to val div 10 - 1 do
    12861304      begin
    1287         BitBlt(dst.Canvas.Handle, xIcon + 4 + (val mod 10) *
     1305        DpiBitBlt(dst.Canvas.Handle, xIcon + 4 + (val mod 10) *
    12881306          (14 * ld div sd) + i * (14 * ld div sd), yIcon + 3, 14, 14,
    12891307          GrExt[HGrSystem].Mask.Canvas.Handle, 67 + 7 mod 8 * 15,
     
    13101328      for i := 0 to val div 10 - 1 do
    13111329      begin
    1312         BitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14,
     1330        DpiBitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14,
    13131331          GrExt[HGrSystem].Mask.Canvas.Handle, 67 + Kind mod 8 * 15,
    13141332          70 + Kind div 8 * 15, SRCAND);
     
    13181336      for i := 0 to val mod 10 - 1 do
    13191337      begin
    1320         BitBlt(dst.Canvas.Handle, xIcon + 4 + (val div 10) *
     1338        DpiBitBlt(dst.Canvas.Handle, xIcon + 4 + (val div 10) *
    13211339          (14 * ld div sd) + i * (10 * ld div sd), yIcon + 7, 10, 10,
    13221340          GrExt[HGrSystem].Mask.Canvas.Handle, 66 + Kind mod 11 * 11,
     
    13551373  begin
    13561374    for i := 0 to pos div 8 - 1 do
    1357       BitBlt(Handle, x + i * 8, y, 8, 7,
     1375      DpiBitBlt(Handle, x + i * 8, y, 8, 7,
    13581376        GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * Kind, SRCCOPY);
    1359     BitBlt(Handle, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7,
     1377    DpiBitBlt(Handle, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7,
    13601378      GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * Kind, SRCCOPY);
    13611379    if Growth > 0 then
    13621380    begin
    13631381      for i := 0 to Growth div 8 - 1 do
    1364         BitBlt(Handle, x + pos + i * 8, y, 8, 7,
     1382        DpiBitBlt(Handle, x + pos + i * 8, y, 8, 7,
    13651383          GrExt[HGrSystem].Data.Canvas.Handle, 112, 9 + 8 * Kind, SRCCOPY);
    1366       BitBlt(Handle, x + pos + 8 * (Growth div 8), y,
     1384      DpiBitBlt(Handle, x + pos + 8 * (Growth div 8), y,
    13671385        Growth - 8 * (Growth div 8), 7, GrExt[HGrSystem].Data.Canvas.Handle,
    13681386        112, 9 + 8 * Kind, SRCCOPY);
     
    13711389    begin
    13721390      for i := 0 to -Growth div 8 - 1 do
    1373         BitBlt(Handle, x + pos + i * 8, y, 8, 7,
     1391        DpiBitBlt(Handle, x + pos + i * 8, y, 8, 7,
    13741392          GrExt[HGrSystem].Data.Canvas.Handle, 104, 1, SRCCOPY);
    1375       BitBlt(Handle, x + pos + 8 * (-Growth div 8), y, -Growth -
     1393      DpiBitBlt(Handle, x + pos + 8 * (-Growth div 8), y, -Growth -
    13761394        8 * (-Growth div 8), 7,
    13771395        GrExt[HGrSystem].Data.Canvas.Handle, 104, 1, SRCCOPY);
     
    14041422  ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 1, wLogo, hLogo,
    14051423    clLight, clShade);
    1406   BitBlt(ca.Handle, x, y, wLogo, hLogo, LogoBuffer.Canvas.Handle, 0,
     1424  DpiBitBlt(ca.Handle, x, y, wLogo, hLogo, LogoBuffer.Canvas.Handle, 0,
    14071425    0, SRCCOPY);
    14081426end;
  • branches/highdpi/Packages/DpiControls/UDpiControls.pas

    r178 r179  
    258258  public
    259259    VclCanvas: TCanvas;
     260    procedure StretchDraw(const DestRect: TRect; SrcGraphic: TDpiGraphic); virtual;
    260261    procedure FrameRect(Rect: TRect);
    261262    procedure Rectangle(X1, Y1, X2, Y2: Integer);
     
    709710procedure Register;
    710711function DpiBitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean;
     712function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN;
     713function ScaleToVcl(Value: Integer): Integer;
     714function ScaleFromVcl(Value: Integer): Integer;
     715function ScalePointToVcl(Value: TPoint): TPoint;
     716function ScalePointFromVcl(Value: TPoint): TPoint;
     717function ScaleSizeToVcl(Value: TSize): TSize;
     718function ScaleSizeFromVcl(Value: TSize): TSize;
     719function ScaleRectToVcl(Value: TRect): TRect;
     720function ScaleRectFromVcl(Value: TRect): TRect;
    711721
    712722
     
    723733  RegisterProjectFileDescriptor(DpiFormFileDesc);
    724734  RegisterComponents('DpiControls', [TDpiButton, TDpiImage, TDpiPaintBox, TDpiListBox]);
     735end;
     736
     737function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN;
     738begin
     739  Result := CreateRectRgn(ScaleToVcl(X1), ScaleToVcl(Y1), ScaleToVcl(X2),
     740    ScaleToVcl(Y2));
    725741end;
    726742
     
    14651481end;
    14661482
     1483procedure TDpiCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TDpiGraphic
     1484  );
     1485begin
     1486  GetVclCanvas.StretchDraw(ScaleRectToVcl(DestRect), SrcGraphic.GetVclGraphic);
     1487end;
     1488
    14671489procedure TDpiCanvas.FrameRect(Rect: TRect);
    14681490begin
  • branches/highdpi/Start.lfm

    r178 r179  
    329329  end
    330330  object PopupMenu1: TPopupMenu
    331     left = 8
    332     top = 8
     331    left = 112
     332    top = 232
    333333  end
    334334end
  • branches/highdpi/Start.pas

    r178 r179  
    266266    Top := Location.Y;
    267267
    268     r0 := CreateRectRgn(0, 0, Width, Height);
    269     r1 := CreateRectRgn(TabOffset + 4 * TabSize + 2, 0, Width, TabHeight);
     268    r0 := DpiCreateRectRgn(0, 0, Width, Height);
     269    r1 := DpiCreateRectRgn(TabOffset + 4 * TabSize + 2, 0, Width, TabHeight);
    270270    CombineRgn(r0, r0, r1, RGN_DIFF);
    271271    DeleteObject(r1);
    272     r1 := CreateRectRgn(QuitBtn.Left, QuitBtn.Top, QuitBtn.Left + QuitBtn.Width,
     272    r1 := DpiCreateRectRgn(QuitBtn.Left, QuitBtn.Top, QuitBtn.Left + QuitBtn.Width,
    273273      QuitBtn.top + QuitBtn.Height);
    274274    CombineRgn(r0, r0, r1, RGN_OR);
     
    326326  Brains[0].Picture := TDpiBitmap.Create;
    327327  Brains[0].Picture.SetSize(64, 64);
    328   BitBlt(Brains[0].Picture.Canvas.Handle, 0, 0, 64, 64,
     328  DpiBitBlt(Brains[0].Picture.Canvas.Handle, 0, 0, 64, 64,
    329329    GrExt[HGrSystem2].Data.Canvas.Handle, 1, 111, SRCCOPY);
    330330  Brains[1].Picture := TDpiBitmap.Create;
    331331  Brains[1].Picture.SetSize(64, 64);
    332   BitBlt(Brains[1].Picture.Canvas.Handle, 0, 0, 64, 64,
     332  DpiBitBlt(Brains[1].Picture.Canvas.Handle, 0, 0, 64, 64,
    333333    GrExt[HGrSystem2].Data.Canvas.Handle, 66, 111, SRCCOPY);
    334334  Brains[2].Picture := TDpiBitmap.Create;
    335335  Brains[2].Picture.SetSize(64, 64);
    336   BitBlt(Brains[2].Picture.Canvas.Handle, 0, 0, 64, 64,
     336  DpiBitBlt(Brains[2].Picture.Canvas.Handle, 0, 0, 64, 64,
    337337    GrExt[HGrSystem2].Data.Canvas.Handle, 131, 111, SRCCOPY);
    338338  Brains[3].Picture := TDpiBitmap.Create;
    339339  Brains[3].Picture.SetSize(64, 64);
    340   BitBlt(Brains[3].Picture.Canvas.Handle, 0, 0, 64, 64,
     340  DpiBitBlt(Brains[3].Picture.Canvas.Handle, 0, 0, 64, 64,
    341341    GrExt[HGrSystem2].Data.Canvas.Handle, 131, 46, SRCCOPY);
    342342
     
    408408  r0, r1: HRgn;
    409409begin
    410   r0 := CreateRectRgn(x0, y0, x1, y1);
     410  r0 := DpiCreateRectRgn(x0, y0, x1, y1);
    411411  for i := 0 to ControlCount - 1 do
    412412    if not (Controls[i] is TArea) and Controls[i].Visible then
    413413    begin
    414414      with Controls[i].BoundsRect do
    415         r1 := CreateRectRgn(left, top, Right, Bottom);
     415        r1 := DpiCreateRectRgn(left, top, Right, Bottom);
    416416      CombineRgn(r0, r0, r1, RGN_DIFF);
    417417      DeleteObject(r1);
     
    419419  if not invalidateTab0 then
    420420  begin
    421     r1 := CreateRectRgn(0, 0, 6 + 36, 3 + 38); // tab 0 icon
     421    r1 := DpiCreateRectRgn(0, 0, 6 + 36, 3 + 38); // tab 0 icon
    422422    CombineRgn(r0, r0, r1, RGN_DIFF);
    423423    DeleteObject(r1);
     
    496496    xActionIcon - 2, y - 2, SRCCOPY);
    497497  GlowFrame(LogoBuffer, 8, 8, 34, 34, $202020);
    498   BitBlt(Canvas.Handle, xActionIcon - 2, y - 2, 50, 50,
     498  DpiBitBlt(Canvas.Handle, xActionIcon - 2, y - 2, 50, 50,
    499499    LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
    500   BitBlt(Canvas.Handle, xActionIcon, y, 40, 40, BigImp.Canvas.Handle,
     500  DpiBitBlt(Canvas.Handle, xActionIcon, y, 40, 40, BigImp.Canvas.Handle,
    501501    (IconIndex mod 7) * xSizeBig + 8, (IconIndex div 7) * ySizeBig, SRCCOPY);
    502502  RFrame(Canvas, xActionIcon - 1, y - 1, xActionIcon + 40, y + 40,
     
    595595  ImageOp_BCC(LogoBuffer, Templates, 10, 27, 155, 38 + 27, 26, 9, $BFBF20,
    596596    $4040DF); // logo part 2
    597   BitBlt(Canvas.Handle, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,
     597  DpiBitBlt(Canvas.Handle, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,
    598598    LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
    599599
     
    615615          - 8, SRCCOPY);
    616616        MakeBlue(LogoBuffer, 0, 0, w, h);
    617         BitBlt(Canvas.Handle, ActionSideBorder + i * wBuffer,
     617        DpiBitBlt(Canvas.Handle, ActionSideBorder + i * wBuffer,
    618618          yAction + SelectedAction * ActionPitch - 8, w, h,
    619619          LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     
    643643              ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 400, 91, 25, 0,
    644644                Colors.Canvas.Pixels[clkAge0 - 1, cliDimmedText]);
    645               BitBlt(Canvas.Handle, xActionIcon, y + 2, 91, 25,
     645              DpiBitBlt(Canvas.Handle, xActionIcon, y + 2, 91, 25,
    646646                LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
    647647            end;
     
    668668        if (i < 13) or (i > 17) then
    669669        begin
    670           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     670          DpiBitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    671671            GrExt[HGrSystem2].Mask.Canvas.Handle, xOrna, yOrna, SRCAND);
    672           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     672          DpiBitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    673673            GrExt[HGrSystem2].Data.Canvas.Handle, xOrna, yOrna, SRCPAINT);
    674674        end;
     
    687687          if Assigned(PlayersBrain[I]) and (PlayersBrain[i].Kind in [btTerm, btRandom, btAI]) then
    688688          begin
    689             BitBlt(Canvas.Handle, xBrain[i] - 18, yBrain[i] + 19, 12, 14,
     689            DpiBitBlt(Canvas.Handle, xBrain[i] - 18, yBrain[i] + 19, 12, 14,
    690690              GrExt[HGrSystem].Data.Canvas.Handle, 134 + (Difficulty[i] - 1) *
    691691              13, 28, SRCCOPY);
     
    707707                PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12,
    708708                MainTexture.clBevelShade, MainTexture.clBevelLight);
    709               BitBlt(Canvas.Handle, xBrain[i] - 31, yBrain[i], 13, 12,
     709              DpiBitBlt(Canvas.Handle, xBrain[i] - 31, yBrain[i], 13, 12,
    710710                GrExt[HGrSystem].Data.Canvas.Handle, 88, 47, SRCCOPY);
    711711            end;
     
    752752        if (i < 2) or (i > 6) then
    753753        begin
    754           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     754          DpiBitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    755755            GrExt[HGrSystem2].Mask.Canvas.Handle, xOrna, yOrna, SRCAND);
    756           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     756          DpiBitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    757757            GrExt[HGrSystem2].Data.Canvas.Handle, xOrna, yOrna, SRCPAINT);
    758758        end;
     
    848848  if MiniMode = mmPicture then
    849849  begin
    850     BitBlt(Canvas.Handle, xMini + 2, yMini + 2, MiniWidth * 2, MiniHeight,
     850    DpiBitBlt(Canvas.Handle, xMini + 2, yMini + 2, MiniWidth * 2, MiniHeight,
    851851      Mini.Canvas.Handle, 0, 0, SRCCOPY);
    852852    if Page = pgStartRandom then
Note: See TracChangeset for help on using the changeset viewer.