Mercurial > projects > doodle
view 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 |
line wrap: on
line source
module doodle.tk.cairo; // THIS module is deprecated public { import doodle.tk.geometry; import cairo.Context; } void rectangle(scope Context cr, in Rectangle rectangle) { cr.rectangle(rectangle.position.x, rectangle.position.y, rectangle.size.x, rectangle.size.y); } void line(scope Context cr, in double x0, in double y0, in double x1, in double y1) { cr.moveTo(x0, y0); cr.lineTo(x1, y1); } // Horizontal line void hline(scope Context cr, in double y, double x0, double x1) { cr.moveTo(x0, y); cr.lineTo(x1, y); } // Vertical line void vline(scope Context cr, in double x, double y0, double y1) { cr.moveTo(x, y0); cr.lineTo(x, y1); }