Mercurial > projects > dwt-mac
comparison dwt/graphics/ImageDataLoader.d @ 32:b9226997409c
Ported dwt.graphics.Image*
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 12 Sep 2008 13:44:30 +0200 |
parents | 380af2bdd8e5 |
children | db5a898b2119 |
comparison
equal
deleted
inserted
replaced
31:9a3047e87f1d | 32:b9226997409c |
---|---|
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * | |
11 * Port to the D programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
10 *******************************************************************************/ | 13 *******************************************************************************/ |
11 module dwt.graphics.ImageDataLoader; | 14 module dwt.graphics.ImageDataLoader; |
12 | 15 |
13 import dwt.dwthelper.utils; | 16 import dwt.dwthelper.utils; |
14 | 17 import dwt.dwthelper.InputStream; |
15 import java.io.InputStream; | 18 import dwt.graphics.ImageLoader; |
16 | 19 |
17 /** | 20 /** |
18 * Internal class that separates ImageData from ImageLoader | 21 * Internal class that separates ImageData from ImageLoader |
19 * to allow removal of ImageLoader from the toolkit. | 22 * to allow removal of ImageLoader from the toolkit. |
20 */ | 23 */ |
21 class ImageDataLoader { | 24 class ImageDataLoader { |
22 | 25 |
23 public static ImageData[] load(InputStream stream) { | 26 public static ImageData[] load(InputStream stream) { |
24 return new ImageLoader().load(stream); | 27 return (new ImageLoader()).load(stream); |
25 } | 28 } |
26 | 29 |
27 public static ImageData[] load(String filename) { | 30 public static ImageData[] load(String filename) { |
28 return new ImageLoader().load(filename); | 31 return (new ImageLoader()).load(filename); |
29 } | 32 } |
30 | 33 |
31 } | 34 } |