summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-16 20:09:15 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-16 20:09:15 +0200
commitafb464b6b191585bc4442bf3d126acb2307f806f (patch)
tree697de2731403324c27a351d4c55816dd51e0c464 /src
parent1b84a0ee82f387333579dc457c4d5a59bc0e9f2e (diff)
downloadfpGUI-afb464b6b191585bc4442bf3d126acb2307f806f.tar.xz
Adds an IFDEF to control what graphics engine to use Xlib/GDI or AggPas.
Once Agg-enabled canvas is fully test, it will become the new default graphics engine.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_main.pas10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 1742ea98..ab406830 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -21,6 +21,9 @@ unit fpg_main;
{.$Define DEBUG}
+// To enable the AggPas powered Canvas
+{.$define AGGCanvas}
+
{ TODO : Implement font size adjustments for each platform. eg: linux=10pt & windows=8pt }
interface
@@ -460,6 +463,9 @@ implementation
uses
strutils,
math,
+{$ifdef AGGCanvas}
+ Agg2D,
+{$endif}
fpg_imgfmt_bmp,
fpg_stdimages,
fpg_translations,
@@ -2665,7 +2671,11 @@ initialization
iCallTrace := -1;
InitializeDebugOutput;
fpgInitMsgQueue;
+{$ifdef AGGCanvas}
+ DefaultCanvasClass := TAgg2D;
+{$else}
DefaultCanvasClass := TfpgCanvas;
+{$endif}
finalization
uClipboard.Free;