Mercurial > projects > dwt-win
comparison dwt/internal/image/WinICOFileFormat.d @ 213:36f5cb12e1a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 17 May 2008 17:34:28 +0200 |
parents | 9a64a7781bab |
children | fd9c62a2998e |
comparison
equal
deleted
inserted
replaced
212:ab60f3309436 | 213:36f5cb12e1a2 |
---|---|
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.internal.image.WinICOFileFormat; | 13 module dwt.internal.image.WinICOFileFormat; |
14 | 14 |
15 public import dwt.internal.image.FileFormat; | 15 import dwt.internal.image.FileFormat; |
16 public import dwt.graphics.PaletteData; | 16 import dwt.graphics.PaletteData; |
17 import dwt.internal.image.WinBMPFileFormat; | 17 import dwt.internal.image.WinBMPFileFormat; |
18 import dwt.DWT; | 18 import dwt.DWT; |
19 import dwt.dwthelper.utils; | |
19 | 20 |
20 import tango.core.Exception; | 21 import tango.core.Exception; |
21 import dwt.dwthelper.System; | 22 |
22 | 23 public final class WinICOFileFormat : FileFormat { |
23 final class WinICOFileFormat : FileFormat { | |
24 | 24 |
25 byte[] bitInvertData(byte[] data, int startIndex, int endIndex) { | 25 byte[] bitInvertData(byte[] data, int startIndex, int endIndex) { |
26 // Destructively bit invert data in the given byte array. | 26 // Destructively bit invert data in the given byte array. |
27 for (int i = startIndex; i < endIndex; i++) { | 27 for (int i = startIndex; i < endIndex; i++) { |
28 data[i] = cast(byte)(255 - data[i - startIndex]); | 28 data[i] = cast(byte)(255 - data[i - startIndex]); |