diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-25 09:29:31 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-25 09:29:31 +0000 |
commit | 1a5fd690766d2dd1805a9b9d0b76d5caa9ffe528 (patch) | |
tree | 83ad623610c5e4b90aef852a994e5d48643e7f15 /src/corelib/x11 | |
parent | 083bdeb224ff6a54a0b494f3a08b067d1d478981 (diff) | |
download | fpGUI-1a5fd690766d2dd1805a9b9d0b76d5caa9ffe528.tar.xz |
* Implemented two new canvas functions. DrawArc() and FillArc()
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/gfx_x11.pas | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas index d5a09843..279c5eba 100644 --- a/src/corelib/x11/gfx_x11.pas +++ b/src/corelib/x11/gfx_x11.pas @@ -116,6 +116,8 @@ type procedure DoEndDraw; override; function GetPixel(X, Y: integer): TfpgColor; override; procedure SetPixel(X, Y: integer; const AValue: TfpgColor); override; + procedure DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: double); override; + procedure DoFillArc(x, y, w, h: TfpgCoord; a1, a2: double); override; public constructor Create; override; destructor Destroy; override; @@ -1309,6 +1311,18 @@ begin {$Note We must still implement DrawPoint} end; +procedure TfpgCanvasImpl.DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: double); +begin + XDrawArc(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1, + Trunc(64 * a1), Trunc(64 * a2)); +end; + +procedure TfpgCanvasImpl.DoFillArc(x, y, w, h: TfpgCoord; a1, a2: double); +begin + XFillArc(xapplication.display, FDrawHandle, Fgc, x, y, w, h, + Trunc(64 * a1), Trunc(64 * a2)); +end; + procedure TfpgCanvasImpl.DoSetFontRes(fntres: TfpgFontResourceBase); begin if fntres = nil then |