comparison dwt/graphics/Path.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 0405e18fec7f
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
27 import dwt.graphics.GCData; 27 import dwt.graphics.GCData;
28 import dwt.graphics.PathData; 28 import dwt.graphics.PathData;
29 29
30 import dwt.dwthelper.System; 30 import dwt.dwthelper.System;
31 import tango.text.convert.Format; 31 import tango.text.convert.Format;
32 import dwt.dwthelper.utils;
32 33
33 /** 34 /**
34 * Instances of this class represent paths through the two-dimensional 35 * Instances of this class represent paths through the two-dimensional
35 * coordinate system. Paths do not have to be continuous, and can be 36 * coordinate system. Paths do not have to be continuous, and can be
36 * described using lines, rectangles, arcs, cubic or quadratic bezier curves, 37 * described using lines, rectangles, arcs, cubic or quadratic bezier curves,
213 * </ul> 214 * </ul>
214 * @exception DWTException <ul> 215 * @exception DWTException <ul>
215 * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 216 * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
216 * </ul> 217 * </ul>
217 */ 218 */
218 public void addString(char[] string, float x, float y, Font font) { 219 public void addString(String string, float x, float y, Font font) {
219 if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 220 if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
220 if (font is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 221 if (font is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
221 if (font.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT); 222 if (font.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
222 wchar[] wstr = StrToWCHARs( string ); 223 wchar[] wstr = StrToWCHARs( string );
223 wchar* buffer = wstr.ptr; 224 wchar* buffer = wstr.ptr;
516 * Returns a string containing a concise, human-readable 517 * Returns a string containing a concise, human-readable
517 * description of the receiver. 518 * description of the receiver.
518 * 519 *
519 * @return a string representation of the receiver 520 * @return a string representation of the receiver
520 */ 521 */
521 override public char[] toString() { 522 override public String toString() {
522 if (isDisposed()) return "Path {*DISPOSED*}"; 523 if (isDisposed()) return "Path {*DISPOSED*}";
523 return Format( "Path {{{}}", handle ); 524 return Format( "Path {{{}}", handle );
524 } 525 }
525 526
526 } 527 }