Changeset 475 for trunk/Packages/DpiControls
- Timestamp:
- Dec 4, 2023, 9:42:30 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/DpiControls/Dpi.Common.pas
r473 r475 4 4 5 5 uses 6 {$IFDEF WINDOWS}Windows,{$ENDIF} 6 7 Classes, SysUtils, LCLType, Types, LCLIntf, Graphics, Dpi.Graphics; 7 8 … … 9 10 DpiControlsComponentPaletteName = 'DpiControls'; 10 11 11 function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 12 function BitBltCanvas(Dest: TCanvas; X, Y, Width, Height: Integer; Src: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 12 function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, 13 YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 14 function BitBltCanvas(Dest: TCanvas; X, Y, Width, Height: Integer; Src: TCanvas; 15 XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 13 16 function CreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 17 function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT; 18 const lprcClip:RECT;hrgnUpdate:HRGN; lprcUpdate: LPRECT): WINBOOL; overload; 14 19 function ScrollDC(Canvas: TCanvas; dx: Longint; dy: Longint; const lprcScroll: TRect; 15 const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean; 20 const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean; overload; 16 21 function ScaleToNative(Value: Integer): Integer; 17 22 function ScaleToNativeDist(Base, Value: Integer): Integer; … … 44 49 Result := LCLIntf.CreateRectRgn(ScaleToNative(X1), ScaleToNative(Y1), ScaleToNative(X2), 45 50 ScaleToNative(Y2)); 51 end; 52 53 function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT; 54 const lprcClip: RECT; hrgnUpdate: HRGN; lprcUpdate: LPRECT): WINBOOL; 55 var 56 R: RECT; 57 begin 58 if Assigned(lprcUpdate) then begin 59 R := ScaleRectToNative(lprcUpdate^); 60 lprcUpdate := @R; 61 end; 62 Result := Windows.ScrollDC(hDC, ScaleToNative(dx), ScaleToNative(dY), 63 ScaleRectToNative(lprcScroll), ScaleRectToNative(lprcClip), hrgnUpdate, lprcUpdate); 46 64 end; 47 65
Note:
See TracChangeset
for help on using the changeset viewer.