Mercurial > projects > doodle
diff doodle/gtk/cairo.d @ 81:d92b9f04b1e8
Bed time
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Mon, 16 Aug 2010 00:04:27 +0930 |
parents | b759414d2b72 |
children |
line wrap: on
line diff
--- a/doodle/gtk/cairo.d Sun Aug 15 23:43:04 2010 +0930 +++ b/doodle/gtk/cairo.d Mon Aug 16 00:04:27 2010 +0930 @@ -16,13 +16,13 @@ void setLineStyle(LineStyle style) { switch (style) { case LineStyle.SOLID: - _cr.setDash([ 4.0, 4.0 ], 0.0); + _cr.setDash([ ], 0.0); break; case LineStyle.DASHED: _cr.setDash([ 4.0, 4.0 ], 0.0); break; case LineStyle.DOTTED: - _cr.setDash([ 4.0, 4.0 ], 0.0); + _cr.setDash([ 1.0, 4.0 ], 0.0); break; default: assert(0); @@ -39,13 +39,13 @@ void pushState() { _cr.save; } void popState() { _cr.restore; } - void drawRectangle(in Rectangle rectangle, bool fill) { + void drawRectangle(in Rectangle rectangle, bool fill = false) { _cr.rectangle(rectangle.position.x, rectangle.position.y, rectangle.size.x, rectangle.size.y); if (fill) { _cr.fill; } else { _cr.stroke; } } - void drawEllipse(in Rectangle rectangle, bool fill) { + void drawEllipse(in Rectangle rectangle, bool fill = false) { // NYI } @@ -66,7 +66,7 @@ _cr.lineTo(x, y1); } - void drawPoly(in Point[] points, bool fill) { + void drawPoly(in Point[] points, bool fill = false) { assert(points.length >= 2); foreach(i, p; points) { if (i == 0) { _cr.moveTo(p.x, p.y); }