comparison dwt/graphics/ImageData.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 f5482da87ed8
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
22 import dwt.DWT; 22 import dwt.DWT;
23 import dwt.internal.CloneableCompatibility; 23 import dwt.internal.CloneableCompatibility;
24 24
25 public import dwt.dwthelper.InputStream; 25 public import dwt.dwthelper.InputStream;
26 import dwt.dwthelper.System; 26 import dwt.dwthelper.System;
27 import dwt.dwthelper.utils;
27 28
28 29
29 /** 30 /**
30 * Instances of this class are device-independent descriptions 31 * Instances of this class are device-independent descriptions
31 * of images. They are typically used as an intermediate format 32 * of images. They are typically used as an intermediate format
388 * <li>ERROR_IO - if an IO error occurs while reading from the file</li> 389 * <li>ERROR_IO - if an IO error occurs while reading from the file</li>
389 * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li> 390 * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
390 * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> 391 * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
391 * </ul> 392 * </ul>
392 */ 393 */
393 public this(char[] filename) { 394 public this(String filename) {
394 ImageData[] data = ImageDataLoader.load(filename); 395 ImageData[] data = ImageDataLoader.load(filename);
395 if (data.length < 1) DWT.error(DWT.ERROR_INVALID_IMAGE); 396 if (data.length < 1) DWT.error(DWT.ERROR_INVALID_IMAGE);
396 ImageData i = data[0]; 397 ImageData i = data[0];
397 setAllFields( 398 setAllFields(
398 i.width, 399 i.width,