Ignore:
Timestamp:
May 21, 2020, 10:30:59 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Enabled scaling under Windows.
  • Fixed: Use correct scaled Windows BitBlt.
  • Modified: Fixed and optimized help watermark method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/DpiControls/UDpiControls.pas

    r246 r247  
    66
    77uses
    8   Classes, SysUtils, LCLProc, LResources, Forms, FormEditingIntf, ProjectIntf,
     8  Windows, Classes, SysUtils, LCLProc, LResources, Forms, FormEditingIntf, ProjectIntf,
    99  Controls, StdCtrls, fgl, Graphics, ComCtrls, ExtCtrls, LCLType, GraphType,
    1010  Types, CustApp, LMessages, LCLIntf, Menus;
     
    990990  YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
    991991begin
    992   Result := BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), ScaleToNative(Width),
    993     ScaleToNative(Height), SrcDC, ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);
     992  {$IFDEF WINDOWS}
     993  // LCLIntf.BitBlt is slower than direct Windows BitBlt
     994  Result := Windows.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),
     995    ScaleToNative(Width), ScaleToNative(Height), SrcDC,
     996    ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);
     997  {$ELSE}
     998  Result := BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),
     999    ScaleToNative(Width), ScaleToNative(Height), SrcDC,
     1000    ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);
     1001  {$ENDIF}
    9941002end;
    9951003
Note: See TracChangeset for help on using the changeset viewer.