| | 56 | /// Structure used to describe a pen. |
|---|
| | 57 | struct PenData |
|---|
| | 58 | { |
|---|
| | 59 | /// Writable property for the pen width. |
|---|
| | 60 | uint width; |
|---|
| | 61 | /// Writable property for the pen color. |
|---|
| | 62 | Color color; |
|---|
| | 63 | /// Writable property for the pen style. |
|---|
| | 64 | PenStyle style; |
|---|
| | 65 | /// Writable property for the pen line joining method. |
|---|
| | 66 | LineJoin lineJoin; |
|---|
| | 67 | } |
|---|
| | 68 | |
|---|
| | 69 | /// Pen class used for drawing lines. |
|---|
| | 70 | class Pen |
|---|
| | 71 | { |
|---|
| | 72 | /// Creates a new Pen from the given data. |
|---|
| | 73 | this(PenData* data); |
|---|
| | 74 | /// Creates a new Pen with a color setting. |
|---|
| | 75 | this(Color color); |
|---|
| | 76 | } |
|---|
| | 77 | |
|---|
| | 78 | /// Brush class used for filling shapes |
|---|
| | 79 | class Brush |
|---|
| | 80 | { |
|---|
| | 81 | /// Creates a new Brush with the given color. |
|---|
| | 82 | this(Color color); |
|---|
| | 83 | } |
|---|
| | 84 | |
|---|
| | 88 | /// |
|---|
| | 89 | GContextPeer peer; |
|---|
| | 90 | /// |
|---|
| | 91 | int hasPeer; |
|---|
| | 92 | /// |
|---|
| | 93 | void dispose(); |
|---|
| | 94 | /// |
|---|
| | 95 | void disposePeer(); |
|---|
| | 96 | /// |
|---|
| | 97 | Rect updateRect(); |
|---|
| | 98 | /// |
|---|
| | 99 | Font setFont(Font f); |
|---|
| | 100 | /// |
|---|
| | 101 | void getFontMetrics(inout FontMetrics fm); |
|---|
| | 102 | /// |
|---|
| | 103 | Pen setPen(Pen p); |
|---|
| | 104 | /// |
|---|
| | 105 | Brush setBrush(Brush b); |
|---|
| | 106 | /// |
|---|
| | 107 | void getClip(Region r); |
|---|
| | 108 | /// |
|---|
| | 109 | void setClip(Region r); |
|---|
| | 110 | /// |
|---|
| | 111 | void DrawRect(inout Rect r); |
|---|
| | 112 | /// |
|---|
| | 113 | void fillRect(inout Rect r); |
|---|
| | 114 | /// |
|---|
| | 115 | void drawText(int x, int y, char[] txt); |
|---|
| | 116 | /// |
|---|
| | 117 | void drawLine(int x1, int y1, int x2, int y2); |
|---|
| | 118 | /// |
|---|
| | 119 | void drawPolyline(Point[] pts); |
|---|
| | 120 | /// |
|---|
| | 121 | void drawPolygon(Point[] pts); |
|---|
| | 122 | /// |
|---|
| | 123 | void fillPolygon(Point[] pts); |
|---|
| | 124 | /// |
|---|
| | 125 | void drawImage(Image im, int x, int y, PaintMode mode = PaintMode.Copy); |
|---|
| | 126 | /// |
|---|
| | 127 | void stretchImage(Image im, int x, int y, int w, int h, PaintMode mode = PaintMode.Copy); |
|---|
| | 128 | /// |
|---|
| | 129 | void drawSubImage(Image im, int x, int y, int sx, int sy, int sw, int sh, PaintMode mode = PaintMode.Copy); |
|---|
| | 130 | /// |
|---|
| | 131 | void stretchSubImage(Image im, int x, int y, int w, int h, int sx, int sy, int sw, int sh, PaintMode mode = PaintMode.Copy); |
|---|
| | 132 | /// |
|---|
| | 133 | void flush(); |
|---|