Changeset 477 for trunk/Packages


Ignore:
Timestamp:
Dec 4, 2023, 11:33:25 PM (12 months ago)
Author:
chronos
Message:
  • Fixed: Scaling on Windows.
Location:
trunk/Packages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r474 r477  
    874874  {$IFDEF WINDOWS}
    875875  // LCLIntf.BitBlt is slower than direct Windows BitBlt
    876   Result := Windows.BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop);
     876  Result := Windows.BitBlt(DestCanvas.Handle, ScaleToNative(X), ScaleToNative(Y),
     877    ScaleToNative(Width), ScaleToNative(Height), SrcCanvas.Handle,
     878    ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);
    877879  {$ELSE}
    878880  Result := BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop);
  • trunk/Packages/DpiControls/Dpi.Graphics.pas

    r474 r477  
    733733  try
    734734    Bitmap.LoadFromFile(FileName);
    735     Width := Bitmap.Width;
    736     Height := Bitmap.Height;
     735    if Self is TRasterImage then begin
     736      TRasterImage(Self).SetSize(Bitmap.Width, Bitmap.Height);
     737    end else begin
     738      Width := Bitmap.Width;
     739      Height := Bitmap.Height;
     740    end;
    737741    if Self is TCustomBitmap then begin
    738742      StretchDrawBitmap(Graphics.TRasterImage(Bitmap),
Note: See TracChangeset for help on using the changeset viewer.