Ignore:
Timestamp:
May 23, 2020, 12:55:52 AM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build DpiScrollDC under Linux.
File:
1 edited

Legend:

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

    r253 r254  
    941941function DpiBitBltCanvas(Dest: TDpiCanvas; X, Y, Width, Height: Integer; Src: TDpiCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
    942942function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN;
    943 function DpiScrollDC(hDC:HDC; dx:longint; dy:longint; const lprcScroll:RECT; const lprcClip:RECT;hrgnUpdate:HRGN; lprcUpdate: LPRECT): WINBOOL;
     943function DpiScrollDC(Canvas: TDpiCanvas; dx: Longint; dy: Longint; const lprcScroll: TRect;
     944  const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean;
    944945function ScaleToNative(Value: Integer): Integer;
    945946function ScaleFromNative(Value: Integer): Integer;
     
    984985end;
    985986
    986 {$IFDEF LINUX}
    987 function LinuxScrollDC(Canvas: TDpiCanvas; dx: longint; dy: longint; const lprcScroll:TRect; const lprcClip:TRect; hrgnUpdate:HRGN; lprcUpdate: PRect):Boolean;
    988 begin
    989 end;
    990 {$ENDIF}
    991 
    992 function DpiScrollDC(hDC: HDC; dx: longint; dy: longint;
    993   const lprcScroll: RECT; const lprcClip: RECT; hrgnUpdate: HRGN;
    994   lprcUpdate: LPRECT): WINBOOL;
     987function DpiScrollDC(Canvas: TDpiCanvas; dx: Longint; dy: Longint;
     988  const lprcScroll: TRect; const lprcClip: TRect; hrgnUpdate: Handle;
     989  lprcUpdate: PRect): Boolean;
    995990begin
    996991  {$IFDEF WINDOWS}
    997   Result := Windows.ScrollDC(hDC, ScaleToNative(dx), ScaleToNative(dy),
     992  Result := Windows.ScrollDC(Canvas.Handle, ScaleToNative(dx), ScaleToNative(dy),
    998993    ScaleRectToNative(lprcScroll), ScaleRectToNative(lprcClip),
    999994    hrgnUpdate, lprcUpdate);
     
    1001996  {$IFDEF LINUX}
    1002997  // Can't do scrolling of DC under Linux, then fallback into BitBlt.
    1003   Result := DpiBitCanvas(Canvas, lprcScroll.Left + dx, lprcScroll.Top + dy, lprcScroll.Right - lprcScroll.Left, lprcScroll.Bottom - lprcScroll.Top,
     998  Result := DpiBitBltCanvas(Canvas, lprcScroll.Left + dx, lprcScroll.Top + dy, lprcScroll.Right - lprcScroll.Left, lprcScroll.Bottom - lprcScroll.Top,
    1004999    Canvas, lprcScroll.Left, lprcScroll.Top);
    10051000  {$ENDIF}
Note: See TracChangeset for help on using the changeset viewer.