Mercurial > projects > doodle
diff doodle/tk/drawing.d @ 73:6f2525e170f2
Cairo/OpenGL checkpoint
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sun, 15 Aug 2010 01:02:15 +0930 |
parents | |
children | 78bc2046256e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doodle/tk/drawing.d Sun Aug 15 01:02:15 2010 +0930 @@ -0,0 +1,39 @@ +module doodle.tk.drawing; + +public { + import doodle.tk.geometry; +} + +interface Drawing { + enum LineStyle { + SOLID, + DASHED, + DOTTED + } + + void setLineStyle(LineStyle style); + void setLineThickness(in double thickness); + //void setLineColor(in Color color); + //void setFillColor(in Color color); + + void drawRectangle(in Rectangle rectangle, bool fill); + void drawEllipse(in Rectangle rectangle, bool fill); + void drawSegment(in Segment segment); + void drawHLine(in double y0, in double x0, in double x1); + void drawVLine(in double x0, in double y0, in double y1); + void drawPoly(in Point[] points, bool fill); + + void pushState(); // Copies all of current state + void popState(); // Restores all of previous state + + void translate(in Vector v); + void translate(in Point p); + void scale(in Vector v); + void zoom(in double z); + + //void setFontFace; + //void setFontSize; + void drawText(in string text); + + // How to fit fonts, metrics, etc in here? +}