Changeset 228 for trunk/cairo/README.html
- Timestamp:
- 11/03/07 22:54:06 (5 years ago)
- Files:
-
- trunk/cairo/README.html (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cairo/README.html
r119 r228 4 4 <head> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta name="generator" content="Docutils 0. 3.8: http://docutils.sourceforge.net/" />6 <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> 7 7 <title>cairo bindings for D</title> 8 <link rel="stylesheet" href="default.css" type="text/css" /> 8 <style type="text/css"> 9 10 /* 11 :Author: David Goodger 12 :Contact: goodger@python.org 13 :Date: $Date: 2006-05-21 22:44:42 +0200 (Sun, 21 May 2006) $ 14 :Revision: $Revision: 4564 $ 15 :Copyright: This stylesheet has been placed in the public domain. 16 17 Default cascading style sheet for the HTML output of Docutils. 18 19 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to 20 customize this style sheet. 21 */ 22 23 /* used to remove borders from tables and images */ 24 .borderless, table.borderless td, table.borderless th { 25 border: 0 } 26 27 table.borderless td, table.borderless th { 28 /* Override padding for "table.docutils td" with "! important". 29 The right padding separates the table cells. */ 30 padding: 0 0.5em 0 0 ! important } 31 32 .first { 33 /* Override more specific margin styles with "! important". */ 34 margin-top: 0 ! important } 35 36 .last, .with-subtitle { 37 margin-bottom: 0 ! important } 38 39 .hidden { 40 display: none } 41 42 a.toc-backref { 43 text-decoration: none ; 44 color: black } 45 46 blockquote.epigraph { 47 margin: 2em 5em ; } 48 49 dl.docutils dd { 50 margin-bottom: 0.5em } 51 52 /* Uncomment (and remove this text!) to get bold-faced definition list terms 53 dl.docutils dt { 54 font-weight: bold } 55 */ 56 57 div.abstract { 58 margin: 2em 5em } 59 60 div.abstract p.topic-title { 61 font-weight: bold ; 62 text-align: center } 63 64 div.admonition, div.attention, div.caution, div.danger, div.error, 65 div.hint, div.important, div.note, div.tip, div.warning { 66 margin: 2em ; 67 border: medium outset ; 68 padding: 1em } 69 70 div.admonition p.admonition-title, div.hint p.admonition-title, 71 div.important p.admonition-title, div.note p.admonition-title, 72 div.tip p.admonition-title { 73 font-weight: bold ; 74 font-family: sans-serif } 75 76 div.attention p.admonition-title, div.caution p.admonition-title, 77 div.danger p.admonition-title, div.error p.admonition-title, 78 div.warning p.admonition-title { 79 color: red ; 80 font-weight: bold ; 81 font-family: sans-serif } 82 83 /* Uncomment (and remove this text!) to get reduced vertical space in 84 compound paragraphs. 85 div.compound .compound-first, div.compound .compound-middle { 86 margin-bottom: 0.5em } 87 88 div.compound .compound-last, div.compound .compound-middle { 89 margin-top: 0.5em } 90 */ 91 92 div.dedication { 93 margin: 2em 5em ; 94 text-align: center ; 95 font-style: italic } 96 97 div.dedication p.topic-title { 98 font-weight: bold ; 99 font-style: normal } 100 101 div.figure { 102 margin-left: 2em ; 103 margin-right: 2em } 104 105 div.footer, div.header { 106 clear: both; 107 font-size: smaller } 108 109 div.line-block { 110 display: block ; 111 margin-top: 1em ; 112 margin-bottom: 1em } 113 114 div.line-block div.line-block { 115 margin-top: 0 ; 116 margin-bottom: 0 ; 117 margin-left: 1.5em } 118 119 div.sidebar { 120 margin-left: 1em ; 121 border: medium outset ; 122 padding: 1em ; 123 background-color: #ffffee ; 124 width: 40% ; 125 float: right ; 126 clear: right } 127 128 div.sidebar p.rubric { 129 font-family: sans-serif ; 130 font-size: medium } 131 132 div.system-messages { 133 margin: 5em } 134 135 div.system-messages h1 { 136 color: red } 137 138 div.system-message { 139 border: medium outset ; 140 padding: 1em } 141 142 div.system-message p.system-message-title { 143 color: red ; 144 font-weight: bold } 145 146 div.topic { 147 margin: 2em } 148 149 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, 150 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { 151 margin-top: 0.4em } 152 153 h1.title { 154 text-align: center } 155 156 h2.subtitle { 157 text-align: center } 158 159 hr.docutils { 160 width: 75% } 161 162 img.align-left { 163 clear: left } 164 165 img.align-right { 166 clear: right } 167 168 ol.simple, ul.simple { 169 margin-bottom: 1em } 170 171 ol.arabic { 172 list-style: decimal } 173 174 ol.loweralpha { 175 list-style: lower-alpha } 176 177 ol.upperalpha { 178 list-style: upper-alpha } 179 180 ol.lowerroman { 181 list-style: lower-roman } 182 183 ol.upperroman { 184 list-style: upper-roman } 185 186 p.attribution { 187 text-align: right ; 188 margin-left: 50% } 189 190 p.caption { 191 font-style: italic } 192 193 p.credits { 194 font-style: italic ; 195 font-size: smaller } 196 197 p.label { 198 white-space: nowrap } 199 200 p.rubric { 201 font-weight: bold ; 202 font-size: larger ; 203 color: maroon ; 204 text-align: center } 205 206 p.sidebar-title { 207 font-family: sans-serif ; 208 font-weight: bold ; 209 font-size: larger } 210 211 p.sidebar-subtitle { 212 font-family: sans-serif ; 213 font-weight: bold } 214 215 p.topic-title { 216 font-weight: bold } 217 218 pre.address { 219 margin-bottom: 0 ; 220 margin-top: 0 ; 221 font-family: serif ; 222 font-size: 100% } 223 224 pre.literal-block, pre.doctest-block { 225 margin-left: 2em ; 226 margin-right: 2em } 227 228 span.classifier { 229 font-family: sans-serif ; 230 font-style: oblique } 231 232 span.classifier-delimiter { 233 font-family: sans-serif ; 234 font-weight: bold } 235 236 span.interpreted { 237 font-family: sans-serif } 238 239 span.option { 240 white-space: nowrap } 241 242 span.pre { 243 white-space: pre } 244 245 span.problematic { 246 color: red } 247 248 span.section-subtitle { 249 /* font-size relative to parent (h1..h6 element) */ 250 font-size: 80% } 251 252 table.citation { 253 border-left: solid 1px gray; 254 margin-left: 1px } 255 256 table.docinfo { 257 margin: 2em 4em } 258 259 table.docutils { 260 margin-top: 0.5em ; 261 margin-bottom: 0.5em } 262 263 table.footnote { 264 border-left: solid 1px black; 265 margin-left: 1px } 266 267 table.docutils td, table.docutils th, 268 table.docinfo td, table.docinfo th { 269 padding-left: 0.5em ; 270 padding-right: 0.5em ; 271 vertical-align: top } 272 273 table.docutils th.field-name, table.docinfo th.docinfo-name { 274 font-weight: bold ; 275 text-align: left ; 276 white-space: nowrap ; 277 padding-left: 0 } 278 279 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, 280 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { 281 font-size: 100% } 282 283 ul.auto-toc { 284 list-style-type: none } 285 286 </style> 9 287 </head> 10 288 <body> 11 289 <div class="document" id="cairo-bindings-for-d"> 12 290 <h1 class="title">cairo bindings for D</h1> 291 13 292 <!-- This document is written in reStructuredText. --> 14 293 <!-- Build command: 15 294 rst2html.py - -date - -time README.rst README.html --> 16 <div class="contents topic" id="contents">17 <p class="topic-title first"><a name="contents">Contents</a></p>295 <div class="contents topic"> 296 <p class="topic-title first"><a id="contents" name="contents">Contents</a></p> 18 297 <ul class="simple"> 19 298 <li><a class="reference" href="#introduction" id="id3" name="id3">Introduction</a></li> … … 38 317 </ul> 39 318 </div> 40 <div class="section" id="introduction">41 <h1><a class="toc-backref" href="#id3" name="introduction">Introduction</a></h1>319 <div class="section"> 320 <h1><a class="toc-backref" href="#id3" id="introduction" name="introduction">Introduction</a></h1> 42 321 <p>This project's aim is to provide a complete, up-to-date D binding for the 43 322 <a class="reference" href="http://cairographics.org/">cairo</a> 2D drawing API. Currently, the binding supports the base cairo … … 49 328 provide a library of additional, high-level functionality with this layer.</p> 50 329 </div> 51 <div class="section" id="installation">52 <h1><a class="toc-backref" href="#id4" name="installation">Installation</a></h1>53 <div class="section" id="cairo-binding">54 <h2><a class="toc-backref" href="#id5" name="cairo-binding">cairo binding</a></h2>330 <div class="section"> 331 <h1><a class="toc-backref" href="#id4" id="installation" name="installation">Installation</a></h1> 332 <div class="section"> 333 <h2><a class="toc-backref" href="#id5" id="cairo-binding" name="cairo-binding">cairo binding</a></h2> 55 334 <p>To install, simply copy the <tt class="docutils literal"><span class="pre">cairo</span></tt> directory to a place in your D 56 335 compiler's import path. That's all there is to it.</p> … … 71 350 libraries with debug symbols <a class="footnote-reference" href="#debuglibs" id="id1" name="id1">[1]</a>.</p> 72 351 <p>Use the <tt class="docutils literal"><span class="pre">--help</span></tt> switch for full usage information.</p> 73 </div> 74 <div class="section" id="cairooo-binding"> 75 <h2><a class="toc-backref" href="#id6" name="cairooo-binding">cairooo binding</a></h2> 352 <p>Also, please note that if you are building static libraries that these 353 libraries only compile for one particular version of cairo at a time. To 354 select which version of the cairo API you want to compile for, you need to use 355 the following additional arguments to the build script:</p> 356 <ul class="simple"> 357 <li>cairo 1.0: no arguments needed.</li> 358 <li>cairo 1.2: <tt class="docutils literal"><span class="pre">+--version=cairo_1_2</span></tt></li> 359 <li>cairo 1.4: <tt class="docutils literal"><span class="pre">+--version=cairo_1_4</span></tt></li> 360 </ul> 361 <p>You will also need to specify the same version identifier when you compile 362 your programs.</p> 363 </div> 364 <div class="section"> 365 <h2><a class="toc-backref" href="#id6" id="cairooo-binding" name="cairooo-binding">cairooo binding</a></h2> 76 366 <p>To install the cairooo binding, simply copy both the <tt class="docutils literal"><span class="pre">cairo</span></tt> and <tt class="docutils literal"><span class="pre">cairooo</span></tt> 77 367 directories to a place on your D compiler's import path.</p> … … 79 369 <tt class="docutils literal"><span class="pre">cairooo-build.d</span></tt> script, which will build them to the <tt class="docutils literal"><span class="pre">lib</span></tt> directory. 80 370 Usage is mostly the same as using <tt class="docutils literal"><span class="pre">cairo-build.d</span></tt> (see above).</p> 81 </div> 82 <div class="section" id="cairo-snippets"> 83 <h2><a class="toc-backref" href="#id7" name="cairo-snippets">cairo snippets</a></h2> 371 <p>Note that cairooo currently does not support cairo 1.2 or 1.4.</p> 372 </div> 373 <div class="section"> 374 <h2><a class="toc-backref" href="#id7" id="cairo-snippets" name="cairo-snippets">cairo snippets</a></h2> 84 375 <p>The <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> and <tt class="docutils literal"><span class="pre">cairooo_snippets</span></tt> directories contain the 85 376 "snippets" example programs provided by the cairo developers ported to D. … … 94 385 <p>Just be sure to create the <tt class="docutils literal"><span class="pre">output</span></tt> directory if it does not exist first.</p> 95 386 </div> 96 <div class="section" id="cairooo-tutorial">97 <h2><a class="toc-backref" href="#id8" name="cairooo-tutorial">cairooo tutorial</a></h2>387 <div class="section"> 388 <h2><a class="toc-backref" href="#id8" id="cairooo-tutorial" name="cairooo-tutorial">cairooo tutorial</a></h2> 98 389 <p>The <tt class="docutils literal"><span class="pre">cairooo_tutorial</span></tt> contains the beginnings of a very simple introductory 99 390 tutorial to programming image programs in D using the cairooo binding. It is 100 391 pathetically incomplete; however, it may be a useful starting point.</p> 101 392 </div> 102 <div class="section" id="demos">103 <h2><a class="toc-backref" href="#id9" name="demos">demos</a></h2>393 <div class="section"> 394 <h2><a class="toc-backref" href="#id9" id="demos" name="demos">demos</a></h2> 104 395 <p>The <tt class="docutils literal"><span class="pre">demos</span></tt> directory will contain a few small demo programs to showcase the 105 396 binding. Currently, it only has one demo, so the plural is prehaps 106 397 misleading. Hopefully this will change :)</p> 107 398 </div> 108 <div class="section" id="documentation">109 <h2><a class="toc-backref" href="#id10" name="documentation">documentation</a></h2>399 <div class="section"> 400 <h2><a class="toc-backref" href="#id10" id="documentation" name="documentation">documentation</a></h2> 110 401 <p>Whilst this project hopes to eventually have full DDoc documentation for the 111 402 cairooo binding, we will not be providing anything other than minimal … … 130 421 </pre> 131 422 </div> 132 <div class="section" id="cairo-for-windows">133 <h2><a class="toc-backref" href="#id11" name="cairo-for-windows">cairo for Windows</a></h2>423 <div class="section"> 424 <h2><a class="toc-backref" href="#id11" id="cairo-for-windows" name="cairo-for-windows">cairo for Windows</a></h2> 134 425 <p>If you are using Windows, you will also probably want to grab the cairo 135 426 library itself. The best version I have found is on <a class="reference" href="http://www.iki.fi/tml/index.html">Tor Lillqvist</a>'s … … 147 438 </div> 148 439 </div> 149 <div class="section" id="usage">150 <h1><a class="toc-backref" href="#id12" name="usage">Usage</a></h1>151 <div class="section" id="cairo">152 <h2><a class="toc-backref" href="#id13" name="cairo">cairo</a></h2>440 <div class="section"> 441 <h1><a class="toc-backref" href="#id12" id="usage" name="usage">Usage</a></h1> 442 <div class="section"> 443 <h2><a class="toc-backref" href="#id13" id="cairo" name="cairo">cairo</a></h2> 153 444 <p>To use the binding, simply import <tt class="docutils literal"><span class="pre">cairo.cairo</span></tt>, along with any other 154 445 parts of the library you need. For example, if you wanted the base cairo … … 167 458 <p>If some part of the library fails to load, these functions will thrown an 168 459 exception which can be caught and dealt with.</p> 460 <p>To select a particular version of the cairo library, make sure you compile 461 with an appropriate version flag:</p> 462 <ul class="simple"> 463 <li>cairo 1.0: no version flag necessary.</li> 464 <li>cairo 1.2: --version=cairo_1_2.</li> 465 <li>cairo 1.4: --version=cairo_1_4.</li> 466 </ul> 169 467 <p>From there, just start using the cairo API as you would from C. The cairo 170 468 website contains a collection of <a class="reference" href="http://cairographics.org/samples/">example snippets</a> in C, and this binding … … 172 470 look in the <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> directory.</p> 173 471 </div> 174 <div class="section" id="cairooo">175 <h2><a class="toc-backref" href="#id14" name="cairooo">cairooo</a></h2>472 <div class="section"> 473 <h2><a class="toc-backref" href="#id14" id="cairooo" name="cairooo">cairooo</a></h2> 176 474 <p>To use the cairooo binding instead, import <tt class="docutils literal"><span class="pre">cairooo.all</span></tt>, along with any 177 475 other parts of the library that you need. To copy the above example, to … … 219 517 </div> 220 518 </div> 221 <div class="section" id="contributing">222 <h1><a class="toc-backref" href="#id15" name="contributing">Contributing</a></h1>519 <div class="section"> 520 <h1><a class="toc-backref" href="#id15" id="contributing" name="contributing">Contributing</a></h1> 223 521 <p>The cairo api has a functionality in it that this binding does not 224 522 yet cover: PDF abd PS for example. However, the only binary version of cairo … … 231 529 In addition to being fun, you get to make pretty pictures in the process!</p> 232 530 </div> 233 <div class="section" id="thanks">234 <h1><a class="toc-backref" href="#id16" name="thanks">Thanks</a></h1>531 <div class="section"> 532 <h1><a class="toc-backref" href="#id16" id="thanks" name="thanks">Thanks</a></h1> 235 533 <ul class="simple"> 236 534 <li>Many thanks for the hard work by the people behind the cairo library.</li> … … 239 537 </ul> 240 538 </div> 241 <div class="section" id="credits">242 <h1><a class="toc-backref" href="#id17" name="credits">Credits</a></h1>539 <div class="section"> 540 <h1><a class="toc-backref" href="#id17" id="credits" name="credits">Credits</a></h1> 243 541 <p>cairo bindings for D Copyright © 2006 Daniel Keep. Portions Copyright © 244 542 2006 Michael Parker.</p> … … 258 556 <div class="footer"> 259 557 <hr class="footer" /> 260 Generated on: 200 6-05-19 02:45UTC.558 Generated on: 2007-11-04 02:51 UTC. 261 559 262 560 </div>
