Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

AggPas demo question

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vladimir Zhirov

Hi,

AggPas demo in <lazarus>\components is great,
but I've got a question about it.

<lazarus>\components\aggpas\lazarus\example\AggPasInLCLDemo2.lpr project shows painting on Agg canvas, and then on bitmap canvas. When painting is done on Agg canvas everything is fine, but graphics that is paint on bitmap canvas appears in gray color instead of blue and red.

If I comment out all painting done via Agg and just draw on regular canvas, the colors are ok.

Is it expected behaviour or bug?

Best regards, Vladimir Zhirov

Reply by email

Graeme Geldenhuys
to Vladimir Zhirov
Vladimir Zhirov wrote 5 lines
AggPas demo in <lazarus>\components is great, but I've got a question about it. <lazarus>\components\aggpas\lazarus\example\AggPasInLCLDemo2.lpr

You have more luck than me then... I get instant application crashes when I try and run any of those two Lazarus demos.

Umm, looking at the code I see Mattias implemented AggPas via the FPCanvas unit - just what I wanted to do before using it as an extra backend for fpGUI. Thanks Mattias - you saved me a lot of work. ;-)

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 9 lines
On 5 February 2010 17:41, Vladimir Zhirov wrote: > > AggPas demo in <lazarus>\components is great, > but I've got a question about it. > > <lazarus>\components\aggpas\lazarus\example\AggPasInLCLDemo2.lpr You have more luck than me then... I get instant application crashes when I try and run any of those two Lazarus demos.

It works under linux and mac. Maybe I made some mistake for windows. Can you create a backtrace or know the problem already?

Umm, looking at the code I see Mattias implemented AggPas via the FPCanvas unit - just what I wanted to do before using it as an extra backend for fpGUI. Thanks Mattias - you saved me a lot of work. ;-)

Yes, there is a FPCanvas canvas and a canvas that makes it easy to use it with the LCL. There is no LCL TCanvas though. And after some small experiments I'm not sure if it makes much sense to create that.

Mattias

Reply by email

Mattias Gaertner
to Vladimir Zhirov: AggPas demo in <lazarus>\components is great, but I've got a question about it.…
Show quoted text 10 lines
Hi, AggPas demo in <lazarus>\components is great, but I've got a question about it. <lazarus>\components\aggpas\lazarus\example\AggPasInLCLDemo2.lpr project shows painting on Agg canvas, and then on bitmap canvas. When painting is done on Agg canvas everything is fine, but graphics that is paint on bitmap canvas appears in gray color instead of blue and red.

It is colorful under linux and mac. Maybe the rgba is wrong for windows.

If I comment out all painting done via Agg and just draw on regular canvas, the colors are ok. Is it expected behaviour or bug?

It's untested. Probably just a wrong pixel format somewhere. Please create a bug report.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Fri, 5 Feb 2010 17:45:23 +0200 It works under linux and mac. Maybe I made some mistake…
Mattias Gaertner wrote
It works under linux and mac. Maybe I made some mistake for windows. Can you create a backtrace or know the problem already?

I tried it under Ubuntu 9.04 (64-bit) and Lazarus with GTK2. I'll update tomorrow on my home PC which is a 32-bit Linux system and see if there is any difference.

Yes, there is a FPCanvas canvas and a canvas that makes it easy to use

Either way it's nice to see another example of how to implement FPCanvas support. I need to tackle it this year for fpGUI, using both the XLib and GDI backends. I have been postponing it for ages as it seems like a daunting task. :-)

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 6 lines
On 5 February 2010 18:04, Mattias Gaertner wrote: > > It works under linux and mac. Maybe I made some mistake for windows. > Can you create a backtrace or know the problem already? I tried it under Ubuntu 9.04 (64-bit) and Lazarus with GTK2.

Ah yes, 64bit.
The aggpas code has some 64bit extras, so apparently 64bit was started. But I also saw strange errors. I looked an hour and didn't found it. This needs some more work too.

Show quoted text 11 lines
I'll update tomorrow on my home PC which is a 32-bit Linux system and see if there is any difference. > Yes, there is a FPCanvas canvas and a canvas that makes it easy to use Either way it's nice to see another example of how to implement FPCanvas support. I need to tackle it this year for fpGUI, using both the XLib and GDI backends. I have been postponing it for ages as it seems like a daunting task. :-)

95% of fpcanvas is quite easy. The font support in aggpas needs more work. And the svg support - well let's forget it. Maybe we can port some Delphi lib.

Mattias

Reply by email