root/trunk/cairo/cairooo_snippets/snippets/path.d

Revision 119, 398 bytes (checked in by DRK, 6 years ago)

* Added bindings for the Glitz and Xlib backends.
* Checked in cairooo: an OO layer on top of the cairo binding.
* Added snippets directory for cairooo
* Added basic tutorial on how to use cairooo
* Added a simple demo program.
* Added scripts for building import libraries.
* Fixed several bugs.
* Drank WAAY too much coffee.

Line 
1 module snippets.path;
2
3 private
4 {
5     import std.math;
6     import cairooo.all;
7     import snippets.common;
8 }
9
10 void snippet_path(Context cr, int width, int height)
11 {
12     cr.moveTo(0.5, 0.1);
13     cr.lineTo(0.9, 0.9);
14     cr.relLineTo(-0.4, 0.0);
15     cr.curveTo(0.2, 0.9, 0.2, 0.5, 0.5, 0.5);
16
17     cr.stroke();
18 }
19
20 static this()
21 {
22     snippets_hash["path"] = &snippet_path;
23 }
Note: See TracBrowser for help on using the browser.