Mercurial > projects > dwt2
comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/RGB.d @ 26:f589fc20a5f9
work on linux phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 21 Mar 2009 11:22:55 +0100 |
parents | f713da8bc051 |
children |
comparison
equal
deleted
inserted
replaced
25:f713da8bc051 | 26:f589fc20a5f9 |
---|---|
15 import java.lang.all; | 15 import java.lang.all; |
16 | 16 |
17 public import org.eclipse.swt.internal.SerializableCompatibility; | 17 public import org.eclipse.swt.internal.SerializableCompatibility; |
18 | 18 |
19 import org.eclipse.swt.SWT; | 19 import org.eclipse.swt.SWT; |
20 import tango.text.convert.Format; | |
21 | 20 |
22 /** | 21 /** |
23 * Instances of this class are descriptions of colors in | 22 * Instances of this class are descriptions of colors in |
24 * terms of the primary additive color model (red, green and | 23 * terms of the primary additive color model (red, green and |
25 * blue). A color may be described in terms of the relative | 24 * blue). A color may be described in terms of the relative |
196 * @param object the object to compare with this object | 195 * @param object the object to compare with this object |
197 * @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 |
198 * | 197 * |
199 * @see #hashCode() | 198 * @see #hashCode() |
200 */ | 199 */ |
201 public override int opEquals(Object object) { | 200 public override equals_t opEquals(Object object) { |
202 if (object is this) return true; | 201 if (object is this) return true; |
203 if( auto rgb = cast(RGB) object ){ | 202 if( auto rgb = cast(RGB) object ){ |
204 return (rgb.red is this.red) && (rgb.green is this.green) && (rgb.blue is this.blue); | 203 return (rgb.red is this.red) && (rgb.green is this.green) && (rgb.blue is this.blue); |
205 } | 204 } |
206 return false; | 205 return false; |