summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-10-05 21:47:13 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-10-05 21:47:13 +0000
commit8571f99a9f8e21d8e96999da505f9139621943b1 (patch)
treeef609a9c392b0d27eee20989fe9d30114acff0d3 /src/corelib/gdi
parentff87ebe7afdf27042b7963ca04246963adbdcaab (diff)
downloadfpGUI-8571f99a9f8e21d8e96999da505f9139621943b1.tar.xz
* Added a new Canvas.DrawPolygon() method
* Added a new unit fpg_extgraphics.pas with extensive shape drawing methods * Added a new conversion method called fpgRectToRect() * Replaced the implementation of TfpgStyle.DrawDirectionArrow to use the new fpg_extgraphics.PaintTriangle() method instead. * Adjusted ComboBox painting of internal button to accomodate the new fpg_extgraphics unit. * Added Jean-Marc's new fpg_spinedit unit. * Made some further improvements and minor fixes to the SpinEdit and SpinEditFloat components. * renamed the fpdoc file fpgfx.xml to fpg_main.xml as per the new unit names.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas10
-rw-r--r--src/corelib/gdi/fpgui_toolkit.lpk6
-rw-r--r--src/corelib/gdi/fpgui_toolkit.pas15
3 files changed, 23 insertions, 8 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index b28e0e3d..49f2fb05 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -87,6 +87,8 @@ type
end;
+ { TfpgCanvasImpl }
+
TfpgCanvasImpl = class(TfpgCanvasBase)
private
FDrawing: boolean;
@@ -131,6 +133,7 @@ type
procedure SetPixel(X, Y: integer; const AValue: TfpgColor); override;
procedure DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: Extended); override;
procedure DoFillArc(x, y, w, h: TfpgCoord; a1, a2: Extended); override;
+ procedure DoDrawPolygon(Points: PPoint; NumPts: Integer; Winding: boolean = False); override;
property DCHandle: TfpgDCHandle read Fgc;
public
constructor Create; override;
@@ -1679,6 +1682,13 @@ begin
{$ENDIF}
end;
+procedure TfpgCanvasImpl.DoDrawPolygon(Points: PPoint; NumPts: Integer; Winding: boolean);
+//var
+// pts: array of TPoint;
+begin
+ Windows.Polygon(Fgc, Points, NumPts);
+end;
+
procedure TfpgCanvasImpl.DoPutBufferToScreen(x, y, w, h: TfpgCoord);
begin
if FBufferBitmap > 0 then
diff --git a/src/corelib/gdi/fpgui_toolkit.lpk b/src/corelib/gdi/fpgui_toolkit.lpk
index 0c62a067..fdc70220 100644
--- a/src/corelib/gdi/fpgui_toolkit.lpk
+++ b/src/corelib/gdi/fpgui_toolkit.lpk
@@ -27,7 +27,7 @@
<License Value="Modified LGPL
"/>
<Version Minor="6" Release="3"/>
- <Files Count="70">
+ <Files Count="71">
<Item1>
<Filename Value="..\stdimages.inc"/>
<Type Value="Include"/>
@@ -308,6 +308,10 @@
<Filename Value="..\..\gui\fpg_spinedit.pas"/>
<UnitName Value="fpg_spinedit"/>
</Item70>
+ <Item71>
+ <Filename Value="..\fpg_extgraphics.pas"/>
+ <UnitName Value="fpg_extgraphics"/>
+ </Item71>
</Files>
<LazDoc Paths="..\..\..\docs\xml\corelib\;..\..\..\docs\xml\corelib\x11\;..\..\..\docs\xml\corelib\gdi\;..\..\..\docs\xml\gui\"/>
<RequiredPkgs Count="1">
diff --git a/src/corelib/gdi/fpgui_toolkit.pas b/src/corelib/gdi/fpgui_toolkit.pas
index bbfa850e..52698712 100644
--- a/src/corelib/gdi/fpgui_toolkit.pas
+++ b/src/corelib/gdi/fpgui_toolkit.pas
@@ -10,13 +10,14 @@ uses
fpg_base, fpg_main, fpg_cmdlineparams, fpg_command_intf, fpg_constants,
fpg_extinterpolation, fpg_imagelist, fpg_imgfmt_bmp, fpg_pofiles,
fpg_popupwindow, fpg_stdimages, fpg_stringhashlist, fpg_translations,
- fpg_stringutils, fpg_utils, fpg_widget, fpg_wuline, fpg_animation,
- fpg_basegrid, fpg_button, fpg_checkbox, fpg_combobox, fpg_customgrid,
- fpg_dialogs, fpg_editcombo, fpg_edit, fpg_form, fpg_gauge, fpg_grid,
- fpg_hyperlink, fpg_iniutils, fpg_label, fpg_listbox, fpg_listview, fpg_memo,
- fpg_menu, fpg_mru, fpg_panel, fpg_popupcalendar, fpg_progressbar,
- fpg_radiobutton, fpg_scrollbar, fpg_style, fpg_tab, fpg_trackbar, fpg_tree,
- fpgui_db, fpg_gdi, fpg_impl, fpg_splitter, fpg_hint, fpg_spinedit;
+ fpg_stringutils, fpg_utils, fpg_widget, fpg_wuline, fpg_animation,
+ fpg_basegrid, fpg_button, fpg_checkbox, fpg_combobox, fpg_customgrid,
+ fpg_dialogs, fpg_editcombo, fpg_edit, fpg_form, fpg_gauge, fpg_grid,
+ fpg_hyperlink, fpg_iniutils, fpg_label, fpg_listbox, fpg_listview, fpg_memo,
+ fpg_menu, fpg_mru, fpg_panel, fpg_popupcalendar, fpg_progressbar,
+ fpg_radiobutton, fpg_scrollbar, fpg_style, fpg_tab, fpg_trackbar, fpg_tree,
+ fpgui_db, fpg_gdi, fpg_impl, fpg_splitter, fpg_hint, fpg_spinedit,
+ fpg_extgraphics;
implementation