mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 16:00:23 +02:00
Qt: implemented TQtWidgetSet.PaintRgn()
git-svn-id: trunk@51649 -
This commit is contained in:
parent
1f33db1190
commit
51f4919a83
@ -5077,6 +5077,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TQtWidgetSet.PaintRgn(DC: HDC; RGN: HRGN): Boolean;
|
||||
var
|
||||
APath: QPainterPathH;
|
||||
begin
|
||||
Result := False;
|
||||
if not IsValidDC(DC) or not IsValidGDIObject(RGN) then
|
||||
exit;
|
||||
if TQtRegion(RGN).FHandle = nil then
|
||||
exit;
|
||||
APath := QPainterPath_create;
|
||||
QPainterPath_addRegion(APath, TQtRegion(RGN).FHandle);
|
||||
QPainterPath_closeSubpath(APath);
|
||||
QPainter_fillPath(TQtDeviceContext(DC).Widget, APath, QPainter_brush(TQtDeviceContext(DC).Widget));
|
||||
QPainterPath_destroy(APath);
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TQtWidgetSet.PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
@ -158,6 +158,7 @@ function MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean; override;
|
||||
|
||||
function OffsetRgn(RGN: HRGN; nXOffset, nYOffset: Integer): Integer; override;
|
||||
|
||||
function PaintRgn(DC: HDC; RGN: HRGN): Boolean; override;
|
||||
function PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean; override;
|
||||
function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous: boolean): boolean; override;
|
||||
function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean; override;
|
||||
|
Loading…
Reference in New Issue
Block a user