Mercurial > projects > dwt-win
comparison dwt/internal/image/PngPlteChunk.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 | 9a64a7781bab |
children | 36f5cb12e1a2 |
comparison
equal
deleted
inserted
replaced
211:ff59aeb96cac | 212:ab60f3309436 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | 2 * Copyright (c) 2000, 2006 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
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 |
19 import dwt.internal.image.PngChunk; | 19 import dwt.internal.image.PngChunk; |
20 import dwt.internal.image.PngFileReadState; | 20 import dwt.internal.image.PngFileReadState; |
21 import dwt.internal.image.PngIhdrChunk; | 21 import dwt.internal.image.PngIhdrChunk; |
22 | 22 |
23 import tango.text.convert.Format; | 23 import tango.text.convert.Format; |
24 import dwt.dwthelper.utils; | |
24 | 25 |
25 class PngPlteChunk : PngChunk { | 26 class PngPlteChunk : PngChunk { |
26 | 27 |
27 int paletteSize; | 28 int paletteSize; |
28 | 29 |
121 | 122 |
122 // Palettes cannot have more than 256 entries. | 123 // Palettes cannot have more than 256 entries. |
123 if (256 < paletteSize) DWT.error(DWT.ERROR_INVALID_IMAGE); | 124 if (256 < paletteSize) DWT.error(DWT.ERROR_INVALID_IMAGE); |
124 } | 125 } |
125 | 126 |
126 override char[] contributeToString() { | 127 override String contributeToString() { |
127 return Format("\n\tPalette size:{}", paletteSize ); | 128 return Format("\n\tPalette size:{}", paletteSize ); |
128 } | 129 } |
129 | 130 |
130 } | 131 } |