annotate dwt/graphics/ImageDataLoader.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 5f2e72114476
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
1 /*******************************************************************************
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
7 *
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
8 * Contributors:
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
10 * Port to the D programming language:
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
11 * Frank Benoit <benoit@tionex.de>
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
12 *******************************************************************************/
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
13 module dwt.graphics.ImageDataLoader;
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
14
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
15 public import dwt.graphics.ImageData;
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
16 public import dwt.dwthelper.InputStream;
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
17
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
18 import dwt.graphics.ImageLoader;
212
ab60f3309436 reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents: 22
diff changeset
19 import dwt.dwthelper.utils;
22
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
20
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
21 /**
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
22 * Internal class that separates ImageData from ImageLoader
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
23 * to allow removal of ImageLoader from the toolkit.
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
24 */
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
25 class ImageDataLoader {
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
26
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
27 public static ImageData[] load(InputStream stream) {
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
28 return (new ImageLoader()).load(stream);
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
29 }
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
30
212
ab60f3309436 reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents: 22
diff changeset
31 public static ImageData[] load(String filename) {
22
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
32 return (new ImageLoader()).load(filename);
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
33 }
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
34
5f2e72114476 Image in work, this revision does not compile
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
35 }