Changeset 179 for branches/highdpi/Packages/DpiControls/UDpiControls.pas
- Timestamp:
- Jun 23, 2019, 9:12:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/DpiControls/UDpiControls.pas
r178 r179 258 258 public 259 259 VclCanvas: TCanvas; 260 procedure StretchDraw(const DestRect: TRect; SrcGraphic: TDpiGraphic); virtual; 260 261 procedure FrameRect(Rect: TRect); 261 262 procedure Rectangle(X1, Y1, X2, Y2: Integer); … … 709 710 procedure Register; 710 711 function DpiBitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean; 712 function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 713 function ScaleToVcl(Value: Integer): Integer; 714 function ScaleFromVcl(Value: Integer): Integer; 715 function ScalePointToVcl(Value: TPoint): TPoint; 716 function ScalePointFromVcl(Value: TPoint): TPoint; 717 function ScaleSizeToVcl(Value: TSize): TSize; 718 function ScaleSizeFromVcl(Value: TSize): TSize; 719 function ScaleRectToVcl(Value: TRect): TRect; 720 function ScaleRectFromVcl(Value: TRect): TRect; 711 721 712 722 … … 723 733 RegisterProjectFileDescriptor(DpiFormFileDesc); 724 734 RegisterComponents('DpiControls', [TDpiButton, TDpiImage, TDpiPaintBox, TDpiListBox]); 735 end; 736 737 function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 738 begin 739 Result := CreateRectRgn(ScaleToVcl(X1), ScaleToVcl(Y1), ScaleToVcl(X2), 740 ScaleToVcl(Y2)); 725 741 end; 726 742 … … 1465 1481 end; 1466 1482 1483 procedure TDpiCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TDpiGraphic 1484 ); 1485 begin 1486 GetVclCanvas.StretchDraw(ScaleRectToVcl(DestRect), SrcGraphic.GetVclGraphic); 1487 end; 1488 1467 1489 procedure TDpiCanvas.FrameRect(Rect: TRect); 1468 1490 begin
Note:
See TracChangeset
for help on using the changeset viewer.