|
Packit |
1470ea |
|
|
Packit |
1470ea |
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="tech-cairo" xml:lang="fr">
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="guide" xref="tech" group="cairo"/>
|
|
Packit |
1470ea |
<revision pkgversion="3.0" date="2011-04-05" status="candidate"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Shaun McCance</name>
|
|
Packit |
1470ea |
<email its:translate="no">shaunm@gnome.org</email>
|
|
Packit |
1470ea |
<years>2011–2012</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<desc>2D, vector-based drawing for high-quality graphics</desc>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>Cairo</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Cairo is a 2D graphics library featuring a sophisticated API for
|
|
Packit |
1470ea |
drawing vector graphics, compositing images, and rendering
|
|
Packit |
1470ea |
anti-aliased text. Cairo provides support for multiple output
|
|
Packit |
1470ea |
devices, including the X Window System, Microsoft Windows, and image
|
|
Packit |
1470ea |
buffers in memory, allowing you to write platform-independent code to
|
|
Packit |
1470ea |
draw graphics on different media.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Cairo's drawing model is similar to those provided by PostScript
|
|
Packit |
1470ea |
and PDF. The Cairo API provides such drawing operations as stroking and
|
|
Packit |
1470ea |
filling cubic Bézier splines, compositing images, and performing affine
|
|
Packit |
1470ea |
transformations. These vector operations allow for rich, anti-aliased
|
|
Packit |
1470ea |
graphics.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Cairo's rich drawing model allows for high-quality rendering to
|
|
Packit |
1470ea |
multiple media. The same API can be used to create on-screen
|
|
Packit |
1470ea |
graphics and text, to render images, or create crisp output suitable
|
|
Packit |
1470ea |
for printing.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
You should use Cairo whenever you need to draw graphics in your
|
|
Packit |
1470ea |
application beyond the widgets provided by GTK+. Almost all of the drawing
|
|
Packit |
1470ea |
inside GTK+ is done using Cairo. Using Cairo for your custom drawing
|
|
Packit |
1470ea |
will allow your application to have high-quality, anti-aliased, and
|
|
Packit |
1470ea |
resolution-independent graphics.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list style="compact">
|
|
Packit |
1470ea |
<item><link href="http://www.cairographics.org/manual/">Cairo Manual</link> </item>
|
|
Packit |
1470ea |
<item><link href="http://www.cairographics.org">The Cairo web site</link> </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</page>
|