Changeset 254
- Timestamp:
- May 23, 2020, 12:55:52 AM (5 years ago)
- Location:
- branches/highdpi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/Term.pas
r252 r254 4190 4190 offscreen.Canvas.Font.Assign(UniFont[ftSmall]); 4191 4191 rec := Rect(0, 0, MapWidth, MapHeight); 4192 DpiScrollDC(offscreen.Canvas .Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt,4192 DpiScrollDC(offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4193 4193 rec, rec, 0, nil); 4194 4194 for DoInvalidate := false to FastScrolling do … … 4197 4197 begin 4198 4198 rec.Bottom := MapHeight - overlap; 4199 DpiScrollDC(Canvas .Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec,4199 DpiScrollDC(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec, 4200 4200 rec, 0, nil); 4201 4201 ProcessOptions := prInvalidate; -
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.