Changeset 254 for branches/highdpi/Packages/DpiControls/UDpiControls.pas
- Timestamp:
- May 23, 2020, 12:55:52 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/DpiControls/UDpiControls.pas
r253 r254 941 941 function DpiBitBltCanvas(Dest: TDpiCanvas; X, Y, Width, Height: Integer; Src: TDpiCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 942 942 function 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; 943 function DpiScrollDC(Canvas: TDpiCanvas; dx: Longint; dy: Longint; const lprcScroll: TRect; 944 const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean; 944 945 function ScaleToNative(Value: Integer): Integer; 945 946 function ScaleFromNative(Value: Integer): Integer; … … 984 985 end; 985 986 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; 987 function DpiScrollDC(Canvas: TDpiCanvas; dx: Longint; dy: Longint; 988 const lprcScroll: TRect; const lprcClip: TRect; hrgnUpdate: Handle; 989 lprcUpdate: PRect): Boolean; 995 990 begin 996 991 {$IFDEF WINDOWS} 997 Result := Windows.ScrollDC( hDC, ScaleToNative(dx), ScaleToNative(dy),992 Result := Windows.ScrollDC(Canvas.Handle, ScaleToNative(dx), ScaleToNative(dy), 998 993 ScaleRectToNative(lprcScroll), ScaleRectToNative(lprcClip), 999 994 hrgnUpdate, lprcUpdate); … … 1001 996 {$IFDEF LINUX} 1002 997 // Can't do scrolling of DC under Linux, then fallback into BitBlt. 1003 Result := DpiBit Canvas(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, 1004 999 Canvas, lprcScroll.Left, lprcScroll.Top); 1005 1000 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.