Changeset 518
- Timestamp:
- Jan 6, 2024, 12:07:04 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Select.pas
r508 r518 1675 1675 1676 1676 Kind := ListKind; 1677 ModalIndication := not (Kind in MustChooseKind);1677 ModalIndication := not (Kind in MustChooseKind); 1678 1678 case Kind of 1679 1679 kProject: -
trunk/Packages/CevoComponents/ScreenTools.pas
r515 r518 892 892 begin 893 893 {$IFDEF WINDOWS} 894 // LCLIntf.BitBlt is slower than direct Windows BitBlt 895 Result := Windows.BitBlt(DestCanvas.Handle, ScaleToNative(X), ScaleToNative(Y), 896 ScaleToNative(Width), ScaleToNative(Height), SrcCanvas.Handle, 897 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 894 {$IFDEF DPI} 895 Result := BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop); 896 {$ELSE} 897 // LCLIntf.BitBlt is slower than direct Windows BitBlt 898 Result := Windows.BitBlt(DestCanvas.Handle, ScaleToNative(X), ScaleToNative(Y), 899 ScaleToNative(Width), ScaleToNative(Height), SrcCanvas.Handle, 900 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 901 {$ENDIF} 898 902 {$ELSE} 899 903 Result := BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop); … … 1788 1792 {$IFDEF DPI} 1789 1793 if CustomDpiEnabled then Screen.Dpi := CustomDpi 1790 else Screen.Dpi := 96; //Screen.GetSystemDpi;1794 else Screen.Dpi := Screen.GetSystemDpi; 1791 1795 {$ENDIF} 1792 1796 finally -
trunk/Packages/DpiControls/Dpi.Common.pas
r516 r518 186 186 SrcWidth, SrcHeight: Integer; 187 187 begin 188 {$IFDEF WINDOWS}189 // LCLIntf.BitBlt is slower than direct Windows BitBlt190 Result := Windows.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),191 ScaleToNative(Width), ScaleToNative(Height), SrcDC,192 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);193 {$ELSE}194 195 188 DstWidth := ScaleToNativeDist(X, Width); 196 189 DstHeight := ScaleToNativeDist(Y, Height); 197 190 SrcWidth := ScaleToNativeDist(XSrc, Width); 198 191 SrcHeight := ScaleToNativeDist(YSrc, Height); 192 199 193 if (DstWidth = SrcWidth) and (DstHeight = SrcHeight) then begin 194 {$IFDEF WINDOWS} 195 // On Windows LCLIntf.BitBlt is slower than direct Windows BitBlt 196 Result := Windows.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 197 DstWidth, DstHeight, SrcDC, 198 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 199 {$ELSE} 200 200 Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 201 201 DstWidth, DstHeight, SrcDC, 202 202 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 203 {$ENDIF} 203 204 end else begin 205 {$IFDEF WINDOWS} 206 // On Windows LCLIntf.BitBlt is slower than direct Windows BitBlt 207 Result := Windows.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 208 Min(SrcWidth, DstWidth), Min(DstHeight, SrcHeight), SrcDC, 209 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 210 211 // Instead calling StretchBlt for entire region try to draw missing part with BitBlt 212 if DstWidth > SrcWidth then begin 213 Windows.BitBlt(DestDC, ScaleToNative(X) + SrcWidth, ScaleToNative(Y), 214 DstWidth - SrcWidth, DstHeight, SrcDC, 215 ScaleToNative(XSrc) + SrcWidth - (DstWidth - SrcWidth), ScaleToNative(YSrc), Rop); 216 end; 217 if DstHeight > SrcHeight then begin 218 Windows.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y) + SrcHeight, 219 DstWidth, DstHeight - SrcHeight, SrcDC, 220 ScaleToNative(XSrc), ScaleToNative(YSrc) + SrcHeight - (DstHeight - SrcHeight), Rop); 221 end; 222 {$ELSE} 204 223 Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 205 SrcWidth, SrcHeight, SrcDC,224 Min(SrcWidth, DstWidth), Min(DstHeight, SrcHeight), SrcDC, 206 225 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 207 226 … … 217 236 ScaleToNative(XSrc), ScaleToNative(YSrc) + SrcHeight - (DstHeight - SrcHeight), Rop); 218 237 end; 219 { Result := LCLIntf.StretchBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 220 DstWidth, DstHeight, SrcDC, 221 ScaleToNative(XSrc), ScaleToNative(YSrc), 222 SrcWidth, SrcHeight, Rop);} 238 {$ENDIF} 223 239 end; 224 225 { Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),226 ScaleToNative(Width), ScaleToNative(Height), SrcDC,227 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);228 }229 {$ENDIF}230 240 end; 231 241
Note:
See TracChangeset
for help on using the changeset viewer.