mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
Qt: implemented GetDCOriginRelativeToWindow()
git-svn-id: trunk@17623 -
This commit is contained in:
parent
f2f66fafb1
commit
f861906cc1
@ -2035,12 +2035,25 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtWidgetSet.GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean;
|
function TQtWidgetSet.GetDCOriginRelativeToWindow(PaintDC: HDC;
|
||||||
|
WindowHandle: HWND; var OriginDiff: TPoint): boolean;
|
||||||
|
var
|
||||||
|
QtDC: TQtDeviceContext absolute PaintDC;
|
||||||
|
Matrix: QMatrixH;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
{$ifdef VerboseQtWinAPI}
|
||||||
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
|
WriteLn('[WinAPI GetDCOriginRelativeToWindow] PaintDC ' + dbghex(PaintDC));
|
||||||
WriteLn('***** [WinAPI TQtWidgetSet.GetDCOriginRelativeToWindow] missing implementation ');
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Result := IsValidDC(PaintDC);
|
||||||
|
if not Result then
|
||||||
|
exit;
|
||||||
|
Matrix := QPainter_Matrix(QtDC.Widget);
|
||||||
|
OriginDiff := Point(0, 0);
|
||||||
|
if Matrix <> nil then
|
||||||
|
begin
|
||||||
|
OriginDiff.X := Round(QMatrix_Dx(Matrix));
|
||||||
|
OriginDiff.Y := Round(QMatrix_Dy(Matrix));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user