Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rap-dev] org.eclipse.swt.graphics.Color class problems in rap-1.1.0

Hello RAP Developers.
Recently i have discovered a problem ("Feature") regarding the org.eclipse.swt.graphics.Color class.

public int getBlue() {
return ( colorNr & 0xFF0000 ) >> 16; => This takes the value from the first position, and SHOULD be the last position
 }
 public int getGreen() {
   return ( colorNr & 0xFF00 ) >> 8; => This is correct
 }

 public int getRed() {
return colorNr & 0xFF; => This is the last position and should be the first
 }

The result is an inverted color i.e RED=FF0000 is 0000FF.
Please review this class or tell me if i am missing something.
Thank you

Sebastian Bota

--

------------------------------------------------------------------------

Best regards/Mit freundlichen Grüßen

Sebastian Bota

SOFTCON IT-Services S.R.L
Take Ionescu Bd. 46B
300124 Timisoara

Phone   : +40-256-430.286
Fax        : +40-256-430.349
Web     : www.softcon-its.ro


Back to the top