summaryrefslogtreecommitdiff
path: root/gfx/gdi
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@users.sourceforge.net>2006-12-07 15:11:50 +0000
committerGraeme Geldenhuys <graemeg@users.sourceforge.net>2006-12-07 15:11:50 +0000
commitc548c149f444cd946e35839ce7d681efd3221d16 (patch)
tree68e9771c7d6386031a79cf3841beebd799c1f66e /gfx/gdi
parentdbbb9e0d3ea19cef11f6442a11c80b065ec6db4d (diff)
downloadfpGUI-c548c149f444cd946e35839ce7d681efd3221d16.tar.xz
* Implement a FillTriangle method for TFCustomCanvas.
* Implement a DrawArrowDirection function for TDefaultStyle
Diffstat (limited to 'gfx/gdi')
-rw-r--r--gfx/gdi/gfx_gdi.pas12
1 files changed, 12 insertions, 0 deletions
diff --git a/gfx/gdi/gfx_gdi.pas b/gfx/gdi/gfx_gdi.pas
index 7f60733b..151e90a9 100644
--- a/gfx/gdi/gfx_gdi.pas
+++ b/gfx/gdi/gfx_gdi.pas
@@ -95,6 +95,7 @@ type
procedure DoDrawLine(const AFrom, ATo: TPoint); override;
procedure DoDrawPoint(const APoint: TPoint); override;
procedure DoFillRect(const ARect: TRect); override;
+ procedure DoFillTriangle(const P1, P2, P3: TPoint); override;
procedure DoTextOut(const APosition: TPoint; const AText: String); override;
procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override;
procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override;
@@ -607,6 +608,17 @@ begin
Windows.FillRect(Handle, r, FBrush);
end;
+procedure TGDICanvas.DoFillTriangle(const P1, P2, P3: TPoint);
+var
+ pts : array[1..3] of windows.TPoint;
+begin
+ pts[1].X := P1.X; pts[1].Y := P1.Y;
+ pts[2].X := P2.X; pts[2].Y := P2.Y;
+ pts[3].X := P3.X; pts[3].Y := P3.Y;
+
+ Windows.Polygon(Handle, pts, 3);
+end;
+
function TGDICanvas.FontCellHeight: Integer;
begin