Keep in mind that I am new to FPC, how do I get started with fpGUI w/Aggpas on a TForm? Do you have any getting started turorial?
There is no "getting started" tutorial, but I am working on one. I've already got various chapter ideas and some text down.
Do you already understand how to create a basic fpGUI application? If not, take a look at the
<fpgui>/examples/gui/ directory for many small demos. If you are using Lazarus IDE, you can register a new project type by installing
<fpgui>/extras/lazarus_ide/fpgui_ide.lpk package. An fpGUI project can then be created by going to "
File -> New... -> Project -> fpGUI Application". All applications and demos included with fpGUI contains Lazarus Project files, so you can just open and compile them too.
Using AggPas with fpGUI. There are two options.
1. There is experimental support which makes AggPas the default backend for fpGUI - thus any existing fpGUI application will automatically use AggPas. Everything is then painted with AggPas and you use the TfpgCanvas as normal. After enough testing this will eventually become the default backend on all platforms. To enable this you need to enable the
AggCanvas compiler define in the
fpgui_toolkit.lpk package and recompile that package. Open the package then go to its
Compiler Options -> Other and remove the "X" after the line
-dAggCanvas2. Alternatively you can use the normal X11 or GDI backends of fpGUI, and only use AggPas to paint to a bitmap which you can then paint somewhere on the screen (or save to a file). Do do this, create an instance of TAgg2D and create a instance of TfpgImage. The image will become the output buffer of whatever you paint with AggPas. To tell TAgg2D about the image, call the
TAgg2D.Attach() method. Now simply paint using the available methods of the TAgg2D class. Documentation for the TAgg2D class can be found at
<fpgui>/docs/aggpas/agg2d.htmlI hope this is enough to get you started. If you want more support don't hesitate to ask. You can also join the official fpGUI support newsgroup where more people will be able to answer and learn from your questions. Details connecting the fpgui.support newsgroup can be found there [
http://fpgui.sourceforge.net/support.shtml]