Mercurial > projects > dwt-mac
comparison dwt/graphics/RGB.d @ 36:db5a898b2119
Fixed a lot of compile errors
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 07 Oct 2008 12:56:18 +0200 |
parents | d408fc12b991 |
children | 642f460a0908 |
comparison
equal
deleted
inserted
replaced
35:7d135fe0caf2 | 36:db5a898b2119 |
---|---|
15 | 15 |
16 | 16 |
17 import dwt.DWT; | 17 import dwt.DWT; |
18 import dwt.internal.SerializableCompatibility; | 18 import dwt.internal.SerializableCompatibility; |
19 | 19 |
20 import tango.text.convert.Format; | |
20 import dwt.dwthelper.utils; | 21 import dwt.dwthelper.utils; |
21 | 22 |
22 /** | 23 /** |
23 * Instances of this class are descriptions of colors in | 24 * Instances of this class are descriptions of colors in |
24 * terms of the primary additive color model (red, green and | 25 * terms of the primary additive color model (red, green and |
194 * @param object the object to compare with this object | 195 * @param object the object to compare with this object |
195 * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise | 196 * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise |
196 * | 197 * |
197 * @see #hashCode() | 198 * @see #hashCode() |
198 */ | 199 */ |
199 public bool opEquals(Object object) { | 200 public int opEquals(Object object) { |
200 if (object is this) return true; | 201 if (object is this) return true; |
201 if (!( null !is cast(RGB)object )) return false; | 202 if (!( null !is cast(RGB)object )) return false; |
202 RGB rgb = cast(RGB)object; | 203 RGB rgb = cast(RGB)object; |
203 return (rgb.red is this.red) && (rgb.green is this.green) && (rgb.blue is this.blue); | 204 return (rgb.red is this.red) && (rgb.green is this.green) && (rgb.blue is this.blue); |
204 } | 205 } |
226 * description of the receiver. | 227 * description of the receiver. |
227 * | 228 * |
228 * @return a string representation of the <code>RGB</code> | 229 * @return a string representation of the <code>RGB</code> |
229 */ | 230 */ |
230 public String toString() { | 231 public String toString() { |
231 return "RGB {" ~ red ~ ", " ~ green ~ ", " ~ blue ~ "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ | 232 return Format("RGB {{}{}{}{}{}{}" , red , ", " , green , ", " , blue , "}"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
232 } | 233 } |
233 | 234 |
234 } | 235 } |