Mercurial > projects > dynamin
comparison dynamin/gui/theme.d @ 104:5c8c1c2e12c0
Change from real to double.
double is not dependant on the platform, and it uses less space.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Fri, 06 Jul 2012 18:39:45 -0500 |
parents | 73060bc3f004 |
children | acdbb30fee7e |
comparison
equal
deleted
inserted
replaced
103:73060bc3f004 | 104:5c8c1c2e12c0 |
---|---|
19 /** | 19 /** |
20 * Draws a rectangle with 1 pixel wide lines inside the specified bounds. The | 20 * Draws a rectangle with 1 pixel wide lines inside the specified bounds. The |
21 * left and top are drawn with the first color, and the right and | 21 * left and top are drawn with the first color, and the right and |
22 * bottom are drawn with the second color. | 22 * bottom are drawn with the second color. |
23 */ | 23 */ |
24 void draw3dRectangle(Graphics g, real x, real y, real width, real height, | 24 void draw3dRectangle(Graphics g, double x, double y, double width, double height, |
25 Color c1, Color c2) { | 25 Color c1, Color c2) { |
26 g.lineWidth = 1; | 26 g.lineWidth = 1; |
27 | 27 |
28 g.source = c1; | 28 g.source = c1; |
29 g.moveTo(x+0.5, y+height-1); | 29 g.moveTo(x+0.5, y+height-1); |
36 g.lineTo(x+width-0.5, y+height-0.5); | 36 g.lineTo(x+width-0.5, y+height-0.5); |
37 g.lineTo(x, y+height-0.5); | 37 g.lineTo(x, y+height-0.5); |
38 g.stroke(); | 38 g.stroke(); |
39 } | 39 } |
40 | 40 |
41 void drawCheckerboard(Graphics g, real x, real y, real width, real height, | 41 void drawCheckerboard(Graphics g, double x, double y, double width, double height, |
42 Color c1, Color c2, int squareSize = 1) { | 42 Color c1, Color c2, int squareSize = 1) { |
43 drawCheckerboard(g, Rect(x, y, width, height), c1, c2, squareSize); | 43 drawCheckerboard(g, Rect(x, y, width, height), c1, c2, squareSize); |
44 } | 44 } |
45 void drawCheckerboard(Graphics g, Rect rect, | 45 void drawCheckerboard(Graphics g, Rect rect, |
46 Color c1, Color c2, int squareSize = 1) { | 46 Color c1, Color c2, int squareSize = 1) { |
114 void Button_paint(Button c, Graphics g); | 114 void Button_paint(Button c, Graphics g); |
115 void CheckBox_paint(CheckBox c, Graphics g); | 115 void CheckBox_paint(CheckBox c, Graphics g); |
116 void RadioButton_paint(CheckBox c, Graphics g); | 116 void RadioButton_paint(CheckBox c, Graphics g); |
117 void ScrollBarTrack_paint(ScrollBarTrack c, Graphics g); | 117 void ScrollBarTrack_paint(ScrollBarTrack c, Graphics g); |
118 void ScrollBarThumb_paint(ScrollBarThumb c, Graphics g); | 118 void ScrollBarThumb_paint(ScrollBarThumb c, Graphics g); |
119 real ScrollBar_size(); | 119 double ScrollBar_size(); |
120 void ArrowButton_paint(ArrowButton c, Graphics g); | 120 void ArrowButton_paint(ArrowButton c, Graphics g); |
121 BorderSize Scrollable_borderSize(Scrollable c); | 121 BorderSize Scrollable_borderSize(Scrollable c); |
122 void Scrollable_paint(Scrollable c, Graphics g); | 122 void Scrollable_paint(Scrollable c, Graphics g); |
123 BorderSize Notebook_borderSize(Notebook c); | 123 BorderSize Notebook_borderSize(Notebook c); |
124 void Tab_paint(TabPage page, Notebook c, Graphics g); | 124 void Tab_paint(TabPage page, Notebook c, Graphics g); |