Recent

Author Topic: Cairo in FPC  (Read 9646 times)

janvb

  • Jr. Member
  • **
  • Posts: 76
Cairo in FPC
« 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?
« Last Edit: August 26, 2014, 09:15:39 pm by janvb »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Cairo in FPC
« Reply #1 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.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Rails

  • Guest
Re: Cairo in FPC
« Reply #2 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/.

janvb

  • Jr. Member
  • **
  • Posts: 76
Re: Cairo in FPC
« Reply #3 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 :)


DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: Cairo in FPC
« Reply #4 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.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Cairo in FPC
« Reply #5 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.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Cairo in FPC
« Reply #6 on: September 26, 2016, 03:00:48 pm »
Why does it have such bad anti-aliasing?
Probably the clipping mask is 1-bit.

 

TinyPortal © 2005-2018