Qt: implemented TQtWidgetSet.PaintRgn()

git-svn-id: trunk@51649 -
This commit is contained in:
zeljko 2016-02-17 12:14:57 +00:00
parent 1f33db1190
commit 51f4919a83
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -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;