Lazarus

Programming => Graphics and Multimedia => Graphics => Topic started by: janvb on August 26, 2014, 09:11:48 pm

Title: Cairo in FPC
Post by: janvb on August 26, 2014, 09:11:48 pm
I notice through some older posts that Cairo is available in FPC. Can anyone give me a head up on how it perform on Windows, and what the easiest way to try it out is?
Title: Re: Cairo in FPC
Post by: taazz on August 26, 2014, 11:47:57 pm
fpc's cairo canvas is an extension for the GTK2 widgetset and is not generic enough to be used on all widget sets. If you need it on windows you need to work on it a bit ee copy the header translation remove any gtk2 references and replace it with something more generic or windows specific depends on your time and will power.
Title: Re: Cairo in FPC
Post by: Rails on August 27, 2014, 12:20:24 am
fpc's cairo canvas is an extension for the GTK2 widgetset and is not generic enough to be used on all widget sets. If you need it on windows you need to work on it a bit ee copy the header translation remove any gtk2 references and replace it with something more generic or windows specific depends on your time and will power.

There is also Luiz Americo's TCairoPaintBox, which I am using with QT on Linux. It has Windows bindings, but I have not tried them at this point.

You can find it at https://code.google.com/p/luipack/ (https://code.google.com/p/luipack/).
Title: Re: Cairo in FPC
Post by: janvb on August 27, 2014, 01:00:16 am
Thanks I will try - if not I will try GTK3, and if that don't work I will do it the easy way since this is a C/C++ library :)

Title: Re: Cairo in FPC
Post by: DJMaster on September 22, 2016, 10:58:53 pm
Take a look at the following fresh new binding:

Cairo: https://github.com/DJMaster/cairo-fpc

Strongly tested under Windows. Linux and other OSs will be available soon.

fpc's cairo canvas is an extension for the GTK2 widgetset and is not generic enough to be used on all widget sets. If you need it on windows you need to work on it a bit ee copy the header translation remove any gtk2 references and replace it with something more generic or windows specific depends on your time and will power.
Title: Re: Cairo in FPC
Post by: Graeme on September 26, 2016, 01:17:15 pm
Why does it have such bad anti-aliasing? Take a look at the first two images - look at the outer edges of the largest black circles. In the 3rd image, look at the text edges.
Title: Re: Cairo in FPC
Post by: mse on September 26, 2016, 03:00:48 pm
Why does it have such bad anti-aliasing?
Probably the clipping mask is 1-bit.