From a128a87d2f8614120fd12926498bd4cd65474800 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sun, 15 Jul 2007 16:58:53 +0000 Subject: [PATCH] + More winapi functions. git-svn-id: trunk@11515 - --- lcl/interfaces/qt/qtwinapi.inc | 36 +++++++++++++++++++++++++++++++++ lcl/interfaces/qt/qtwinapih.inc | 3 +++ 2 files changed, 39 insertions(+) diff --git a/lcl/interfaces/qt/qtwinapi.inc b/lcl/interfaces/qt/qtwinapi.inc index 3d856ef793..82cea902f7 100644 --- a/lcl/interfaces/qt/qtwinapi.inc +++ b/lcl/interfaces/qt/qtwinapi.inc @@ -30,6 +30,42 @@ //##apiwiz##sps## // Do not remove, no wizard declaration before this line +{------------------------------------------------------------------------------ + Function: Arc + Params: DC: HDC; Left,Top,Right,Bottom,angle1,angle2 : Integer + Returns: Boolean + ------------------------------------------------------------------------------} +function TQtWidgetSet.Arc(DC: HDC; Left,Top,Right,Bottom,angle1,angle2 : Integer): Boolean; +var + ADC : TQtDeviceContext; +begin + {$ifdef VerboseQtWinAPI} + WriteLn('[WinAPI Arc] DC: ', dbghex(DC)); + {$endif} + Result := IsValidDC(DC); + if Result + then + QPainter_drawArc(TQtDeviceContext(DC).Widget, Left, Top, Right, Bottom, Angle1, Angle2); +end; + +{------------------------------------------------------------------------------ + Function: AngleChord + Params: DC: HDC; x1, y1, x2, y2, angle1, angle2: Integer + Returns: Boolean + ------------------------------------------------------------------------------} +function TQtWidgetSet.AngleChord(DC: HDC; x1, y1, x2, y2, angle1, angle2: Integer): Boolean; +var + ADC : TQtDeviceContext; +begin + {$ifdef VerboseQtWinAPI} + WriteLn('[WinAPI AngleChord] DC: ', dbghex(DC)); + {$endif} + Result := IsValidDC(DC); + if Result + then + QPainter_drawChord(TQtDeviceContext(DC).Widget, x1, y1, x2, y2, Angle1, Angle2); +end; + {------------------------------------------------------------------------------ Function: BeginPaint Params: diff --git a/lcl/interfaces/qt/qtwinapih.inc b/lcl/interfaces/qt/qtwinapih.inc index 8a31581c36..05f91088b1 100644 --- a/lcl/interfaces/qt/qtwinapih.inc +++ b/lcl/interfaces/qt/qtwinapih.inc @@ -27,6 +27,9 @@ //##apiwiz##sps## // Do not remove, no wizard declaration before this line +function Arc(DC: HDC; Left,Top,Right,Bottom,angle1,angle2 : Integer): Boolean; override; +function AngleChord(DC: HDC; x1, y1, x2, y2, angle1, angle2: Integer): Boolean; override; + function BeginPaint(Handle: hWnd; Var PS : TPaintStruct) : hdc; override; function ClientToScreen(Handle: HWND; var P: TPoint) : Boolean; override;