comparison doodle/tk/cairo.d @ 73:6f2525e170f2

Cairo/OpenGL checkpoint
author "David Bryant <bagnose@gmail.com>"
date Sun, 15 Aug 2010 01:02:15 +0930
parents doodle/cairo/routines.d@43cc2135ced0
children
comparison
equal deleted inserted replaced
72:5cc2de64f6d0 73:6f2525e170f2
1 module doodle.tk.cairo;
2
3 // THIS module is deprecated
4
5 public {
6 import doodle.tk.geometry;
7 import cairo.Context;
8 }
9
10 void rectangle(scope Context cr, in Rectangle rectangle) {
11 cr.rectangle(rectangle.position.x, rectangle.position.y,
12 rectangle.size.x, rectangle.size.y);
13 }
14
15 void line(scope Context cr, in double x0, in double y0, in double x1, in double y1) {
16 cr.moveTo(x0, y0);
17 cr.lineTo(x1, y1);
18 }
19
20 // Horizontal line
21 void hline(scope Context cr, in double y, double x0, double x1) {
22 cr.moveTo(x0, y);
23 cr.lineTo(x1, y);
24 }
25
26 // Vertical line
27 void vline(scope Context cr, in double x, double y0, double y1) {
28 cr.moveTo(x, y0);
29 cr.lineTo(x, y1);
30 }