Qt: implemented TQtWidgetSet.RadialPie(). Patch by Giuliano Colla. issue #26703

git-svn-id: trunk@46199 -
This commit is contained in:
zeljko 2014-09-12 07:16:53 +00:00
parent 76de5178a1
commit 4ee0f9c9c5
2 changed files with 21 additions and 1 deletions

View File

@ -430,6 +430,25 @@ begin
end;
end; {TQtWidgetSet.PromptUser}
{------------------------------------------------------------------------------
Function: RadialPie
Params: DC, PaintRect coordinates, StartAngle16, StopAngle16
Returns: True if done, False if invalid
------------------------------------------------------------------------------}
function TQtWidgetSet.RadialPie(DC: HDC; x1, y1, x2, y2, Angle1, Angle2: Integer): Boolean;
var
theWidth,theHeight: Integer;
begin
Result := IsValidDC(DC) and (x2 > x1) and (y2 > y1);
if Result then begin
theWidth := x2 - x1 + 1;
theHeight := y2 - y1 + 1;
QPainter_drawPie(TQtDeviceContext(DC).Widget, x1, y1, theWidth, theHeight, Angle1, Angle2);
end;
end;
{------------------------------------------------------------------------------
Function: RawImage_CreateBitmaps
Params: ARawImage:

View File

@ -58,11 +58,12 @@ function PromptUser(const DialogCaption : string;
DefaultIndex : LongInt;
EscapeResult : LongInt) : LongInt; override;
function RadialPie(DC: HDC; x1, y1, x2, y2, Angle1, Angle2: Integer): Boolean; override;
function RawImage_CreateBitmaps(const ARawImage: TRawImage; out ABitmap, AMask: HBitmap; ASkipMask: Boolean = False): Boolean; override;
function RawImage_DescriptionFromBitmap(ABitmap: HBITMAP; out ADesc: TRawImageDescription): Boolean; override;
function RawImage_DescriptionFromDevice(ADC: HDC; out ADesc: TRawImageDescription): Boolean; override;
function RawImage_FromBitmap(out ARawImage: TRawImage; ABitmap, AMask: HBITMAP; ARect: PRect = nil): Boolean; override;
function RawImage_FromDevice(out ARawImage: TRawImage; ADC: HDC; const ARect: TRect): Boolean; override;
function RawImage_QueryDescription(AFlags: TRawImageQueryFlags; var ADesc: TRawImageDescription): Boolean; override;