GTK+ Goes Cairo; Owen Taylor on X/Cairo/GTK+ Integration

GTK+ is now the first major toolkit to depend on the Cairo vector graphics library which is designed to provide high-quality display and print output. Cairo will add 3 more dependencies to GTK: itself, glitz and libpixman (after atk, Pango, Glib, FontConfig and the standard X libs). The addition is now part of the HEAD of GTK’s CVS. Some might argue that Cairo should have been integrated to X instead (as an extension or as part of the core), so all toolkits would get the benefits, transparently (if enough engineering was to go into this). I sent an email to selected GTK+ developers last May about this, and here is what Owen Taylor, GTK’s project leader, replied: Update: GTK+ 2.6.2 released.
[…] The work that Carl [Worth] has been doing at creating a really high quality vector graphics library is only a portion of the solution, yes, but it is a very important part. By adopting this into GTK+, Qt, Mozilla, OpenOffice, etc, we’ll share more code and everybody will render better.

In some cases this adoption will be under the surface and the user will just see better rendering. In other cases (and we plan to do this in GTK+) the Cairo programming interface will be exposed directly, so that we don’t just get more uniform rendering, we’ll also have a more uniform programmer interface.

You ask why Cairo can’t just be integrated into X at a low level and make everything look good. This doesn’t work because Cairo contains all sorts of concepts that just aren’t in the X currently. While the X API can say “Draw a rectangle”, Cairo can say “Draw a Bezier curve with 50 percent alpha and a radial gradient”. New and very different API is required to take advantage of these capabilities.

You ask why we need all these different backends, all these dependencies, all these different modules. While they may seem to make things worse for someone trying to get stuff built and playing around with it they actually will make a big difference getting this stuff deployed quickly:

– – Because Cairo supports multiple backends, I can use Cairo in GTK+ which needs to work on Windows and other platforms as well.

– – Because Cairo can be used with an unmodified X server, I can use Cairo in GTK+ as soon as Cairo is released, instead of waiting for all our users to get a new X server.

– – Because development is being done in a modular fashion, it can proceed in a much faster way; a Cairo release can be made without waiting for an entire new release of the X window system.

Yes, there is some temporary pain (which build scripts like jhbuild [gnome-building script] can make a lot easier), but in the long run, these packages will get incorporated into operating system distributions and users won’t have to worry about the number of individual packages someone building from source would have to download.

Regards,
Owen

72 Comments

  1. 2005-02-04 6:44 am
  2. 2005-02-04 7:04 am
  3. 2005-02-04 7:08 am
  4. 2005-02-04 7:37 am
  5. 2005-02-04 7:41 am
  6. 2005-02-04 7:51 am
  7. 2005-02-04 7:53 am
  8. 2005-02-04 7:55 am
  9. 2005-02-04 8:03 am
  10. 2005-02-04 8:06 am
  11. 2005-02-04 8:12 am
  12. 2005-02-04 8:38 am
  13. 2005-02-04 8:42 am
  14. 2005-02-04 9:10 am
  15. 2005-02-04 10:03 am
  16. 2005-02-04 10:09 am
  17. 2005-02-04 10:14 am
  18. 2005-02-04 10:29 am
  19. 2005-02-04 10:44 am
  20. 2005-02-04 10:54 am
  21. 2005-02-04 11:19 am
  22. 2005-02-04 11:42 am
  23. 2005-02-04 12:01 pm
  24. 2005-02-04 12:03 pm
  25. 2005-02-04 12:14 pm
  26. 2005-02-04 12:25 pm
  27. 2005-02-04 12:27 pm
  28. 2005-02-04 12:28 pm
  29. 2005-02-04 1:31 pm
  30. 2005-02-04 1:44 pm
  31. 2005-02-04 1:58 pm
  32. 2005-02-04 2:09 pm
  33. 2005-02-04 2:13 pm
  34. 2005-02-04 2:27 pm
  35. 2005-02-04 2:33 pm
  36. 2005-02-04 2:46 pm
  37. 2005-02-04 2:49 pm
  38. 2005-02-04 2:51 pm
  39. 2005-02-04 2:53 pm
  40. 2005-02-04 3:05 pm
  41. 2005-02-04 3:08 pm
  42. 2005-02-04 3:50 pm
  43. 2005-02-04 3:57 pm
  44. 2005-02-04 4:13 pm
  45. 2005-02-04 4:16 pm
  46. 2005-02-04 4:17 pm
  47. 2005-02-04 4:18 pm
  48. 2005-02-04 4:30 pm
  49. 2005-02-04 4:32 pm
  50. 2005-02-04 4:44 pm
  51. 2005-02-04 4:50 pm
  52. 2005-02-04 4:51 pm
  53. 2005-02-04 5:00 pm
  54. 2005-02-04 5:13 pm
  55. 2005-02-04 5:28 pm
  56. 2005-02-04 5:46 pm
  57. 2005-02-04 6:12 pm
  58. 2005-02-04 6:17 pm
  59. 2005-02-04 6:23 pm
  60. 2005-02-04 6:37 pm
  61. 2005-02-04 6:45 pm
  62. 2005-02-04 7:33 pm
  63. 2005-02-04 8:53 pm
  64. 2005-02-04 9:24 pm
  65. 2005-02-04 10:12 pm
  66. 2005-02-04 11:36 pm
  67. 2005-02-05 11:43 am
  68. 2005-02-05 3:55 pm
  69. 2005-02-05 5:22 pm
  70. 2005-02-05 5:37 pm
  71. 2005-02-06 2:07 am
  72. 2005-02-07 12:15 am