README 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. Cairo - Multi-platform 2D graphics library
  2. http://cairographics.org
  3. What is cairo
  4. =============
  5. Cairo is a 2D graphics library with support for multiple output
  6. devices. Currently supported output targets include the X Window
  7. System (via both Xlib and XCB), quartz, win32, and image buffers,
  8. as well as PDF, PostScript, and SVG file output. Experimental backends
  9. include OpenGL, BeOS, OS/2, and DirectFB.
  10. Cairo is designed to produce consistent output on all output media
  11. while taking advantage of display hardware acceleration when available
  12. (for example, through the X Render Extension).
  13. The cairo API provides operations similar to the drawing operators of
  14. PostScript and PDF. Operations in cairo include stroking and filling
  15. cubic Bézier splines, transforming and compositing translucent images,
  16. and antialiased text rendering. All drawing operations can be
  17. transformed by any affine transformation (scale, rotation, shear,
  18. etc.).
  19. Cairo has been designed to let you draw anything you want in a modern
  20. 2D graphical user interface. At the same time, the cairo API has been
  21. designed to be as fun and easy to learn as possible. If you're not
  22. having fun while programming with cairo, then we have failed
  23. somewhere---let us know and we'll try to fix it next time around.
  24. Cairo is free software and is available to be redistributed and/or
  25. modified under the terms of either the GNU Lesser General Public
  26. License (LGPL) version 2.1 or the Mozilla Public License (MPL) version
  27. 1.1.
  28. Where to get more information about cairo
  29. =========================================
  30. The primary source of information about cairo is:
  31. http://cairographics.org/
  32. The latest versions of cairo can always be found at:
  33. http://cairographics.org/download
  34. Documentation on using cairo and frequently-asked questions:
  35. http://cairographics.org/documentation
  36. http://cairographics.org/FAQ
  37. Mailing lists for contacting cairo users and developers:
  38. http://cairographics.org/lists
  39. Roadmap and unscheduled things to do, (please feel free to help out):
  40. http://cairographics.org/roadmap
  41. http://cairographics.org/todo
  42. Dependencies
  43. ============
  44. The set of libraries needed to compile cairo depends on which backends
  45. are enabled when cairo is configured. So look at the list below to
  46. determine which dependencies are needed for the backends of interest.
  47. For the surface backends, we have both "supported" and "experimental"
  48. backends. Further, the supported backends can be divided into the
  49. "standard" backends which can be easily built on any platform, and the
  50. "platform" backends which depend on some underlying platform-specific
  51. system, (such as the X Window System or some other window system).
  52. As an example, for a standard Linux build similar to what's shipped by
  53. your distro, (with image, png, pdf, PostScript, svg, and xlib surface
  54. backends, and the freetype font backend), the following sample commands
  55. will install necessary dependencies:
  56. Debian (and similar):
  57. apt-get build-dep cairo
  58. Fedora (and similar):
  59. yum install libpng-devel zlib-devel libXrender-devel fontconfig-devel
  60. Technically you probably don't need pixman from the distribution since
  61. if you're manually compiling Cairo you probably want an updated pixman
  62. as well. However, if you follow the default settings and install pixman
  63. to /usr/local, your Cairo build should properly use it in preference to
  64. the system pixman.
  65. Supported, "standard" surface backends
  66. ------------------------------------
  67. image backend (required)
  68. ------------------------
  69. pixman >= 0.30.0 http://cairographics.org/releases
  70. png support (can be left out if desired, but many
  71. ----------- applications expect it to be present)
  72. libpng http://www.libpng.org/pub/png/libpng.html
  73. pdf backend
  74. -----------
  75. zlib http://www.gzip.org/zlib
  76. postscript backend
  77. ------------------
  78. zlib http://www.gzip.org/zlib
  79. svg backend
  80. -----------
  81. [none]
  82. Supported, "platform" surface backends
  83. -----------------------------------
  84. xlib backend
  85. ------------
  86. X11 http://freedesktop.org/Software/xlibs
  87. xlib-xrender backend
  88. --------------------
  89. Xrender >= 0.6 http://freedesktop.org/Software/xlibs
  90. quartz backend
  91. --------------
  92. MacOS X >= 10.5 with Xcode >= 3.0
  93. win32 backend
  94. -------------
  95. Microsoft Windows 2000 or newer[*].
  96. xcb backend
  97. -----------
  98. XCB http://xcb.freedesktop.org
  99. Font backends (required to have at least one)
  100. ---------------------------------------------
  101. freetype font backend
  102. ---------------------
  103. freetype >= 2.1.9 http://freetype.org
  104. fontconfig http://fontconfig.org
  105. quartz-font backend
  106. -------------------
  107. MacOS X >= 10.4 with Xcode >= 2.4
  108. win32 font backend
  109. ------------------
  110. Microsoft Windows 2000 or newer[*].
  111. [*] The Win32 backend should work on Windows 2000 and newer
  112. (excluding Windows Me.) Most testing has been done on
  113. Windows XP. While some portions of the code have been
  114. adapted to work on older versions of Windows, considerable
  115. work still needs to be done to get cairo running in those
  116. environments.
  117. Cairo can be compiled on Windows with either the gcc
  118. toolchain (see http://www.mingw.org) or with Microsoft
  119. Visual C++. If the gcc toolchain is used, the standard
  120. build instructions using configure apply, (see INSTALL).
  121. If Visual C++ is desired, GNU make is required and
  122. Makefile.win32 can be used via 'make -f Makefile.win32'.
  123. The compiler, include paths, and library paths must be set
  124. up correctly in the environment.
  125. MSVC versions earlier than 7.1 are known to miscompile
  126. parts of cairo and pixman, and so should be avoided. MSVC
  127. 7.1 or later, including the free Microsoft Visual Studio
  128. Express editions, produce correct code.
  129. Experimental surface backends
  130. -----------------------------
  131. beos backend
  132. ------------
  133. No dependencies in itself other than an installed BeOS system, but cairo
  134. requires a font backend. See the freetype dependency list.
  135. os2 backend
  136. -----------
  137. Cairo should run on any recent version of OS/2 or eComStation, but it
  138. requires a font backend. See the freetype dependency list. Ready to use
  139. packages and developer dependencies are available at Netlabs:
  140. ftp://ftp.netlabs.org/pub/cairo
  141. skia backend
  142. ------------
  143. Requires the skia library as of June 2014. Since skia is not
  144. API stable, building against newer (or older) versions of skia
  145. will probably fail.
  146. Compiling
  147. =========
  148. See the INSTALL document for build instructions.
  149. History
  150. =======
  151. Cairo was originally developed by Carl Worth <cworth@cworth.org> and
  152. Keith Packard <keithp@keithp.com>. Many thanks are due to Lyle Ramshaw
  153. without whose patient help our ignorance would be much more apparent.
  154. Since the original development, many more people have contributed to
  155. cairo. See the AUTHORS files for as complete a list as we've been able
  156. to compile so far.