Mercurial > projects > dwt-win
comparison dwt/graphics/TextStyle.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 97c2675aca38 |
children | 36f5cb12e1a2 |
comparison
equal
deleted
inserted
replaced
211:ff59aeb96cac | 212:ab60f3309436 |
---|---|
16 import dwt.graphics.Font; | 16 import dwt.graphics.Font; |
17 import dwt.graphics.Color; | 17 import dwt.graphics.Color; |
18 import dwt.graphics.GlyphMetrics; | 18 import dwt.graphics.GlyphMetrics; |
19 | 19 |
20 import tango.util.Convert; | 20 import tango.util.Convert; |
21 import dwt.dwthelper.utils; | |
22 | |
21 /** | 23 /** |
22 * <code>TextStyle</code> defines a set of styles that can be applied | 24 * <code>TextStyle</code> defines a set of styles that can be applied |
23 * to a range of text. | 25 * to a range of text. |
24 * <p> | 26 * <p> |
25 * The hashCode() method in this class uses the values of the public | 27 * The hashCode() method in this class uses the values of the public |
171 * Returns a string containing a concise, human-readable | 173 * Returns a string containing a concise, human-readable |
172 * description of the receiver. | 174 * description of the receiver. |
173 * | 175 * |
174 * @return a string representation of the <code>TextStyle</code> | 176 * @return a string representation of the <code>TextStyle</code> |
175 */ | 177 */ |
176 override public char[] toString () { | 178 override public String toString () { |
177 char[] buffer = "TextStyle {"; | 179 String buffer = "TextStyle {"; |
178 int startLength = buffer.length; | 180 int startLength = buffer.length; |
179 if (font !is null) { | 181 if (font !is null) { |
180 if (buffer.length > startLength) buffer ~= ", "; | 182 if (buffer.length > startLength) buffer ~= ", "; |
181 buffer ~= "font="; | 183 buffer ~= "font="; |
182 buffer ~= font.toString; | 184 buffer ~= font.toString; |
200 buffer ~= "striked out"; | 202 buffer ~= "striked out"; |
201 } | 203 } |
202 if (rise !is 0) { | 204 if (rise !is 0) { |
203 if (buffer.length > startLength) buffer ~= ", "; | 205 if (buffer.length > startLength) buffer ~= ", "; |
204 buffer ~= "rise="; | 206 buffer ~= "rise="; |
205 buffer ~= to!(char[])(rise); | 207 buffer ~= to!(String)(rise); |
206 } | 208 } |
207 if (metrics !is null) { | 209 if (metrics !is null) { |
208 if (buffer.length > startLength) buffer ~= ", "; | 210 if (buffer.length > startLength) buffer ~= ", "; |
209 buffer ~= "metrics="; | 211 buffer ~= "metrics="; |
210 buffer ~= metrics.toString; | 212 buffer ~= metrics.toString; |