Mercurial > projects > doodle
view doodle/tk/drawing.d @ 78:024a5608087f
Meh
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sun, 15 Aug 2010 15:19:14 +0930 |
parents | 78bc2046256e |
children | 535bae7a7305 |
line wrap: on
line source
module doodle.tk.drawing; public { import doodle.tk.geometry; } interface Drawable { 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); void measureText(in string text, out Rectangle logicalBounds, out Rectangle totalBounds); // How to fit fonts, metrics, etc in here? // Initially let's just support one font }