function KfpgWidget.CreateCanvas: TfpgCanvasBase;
begin
result:=TAgg2D.create(self);
end;
now I can use aggpas drawing on my custom widget! )
I haven't tried myself, but instead of editing
fpg_widget or
fpg_main, why not simply compile fpGUI without
AGGCanvas enabled, then in the unit where you define your own widgets (eg:
KfpgWidget as shown above) you add
Agg2D to the uses clause, then override
CreateCanvas() like you did before.
In theory it should result in the same thing without having local mods of
fpg_widget or
fpg_main.