Ignore:
Timestamp:
Jun 23, 2019, 9:12:54 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved scaling support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.