[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [rap-dev] org.eclipse.swt.graphics.Color class problems in rap-1.1.0
|
But then , if i have a color let's say RED (FF0000) represented as int
(16711680).
After creating a color instance i get the color as 0000FF. Same happens
for every color (i.e Yellow: FFFF00 becomes 00FFFF)
Dmitry Pryadkin wrote:
It's okay. R is stored in the lowest byte (or first as you say) as
0xFF indicates.
Sebastian Bota wrote:
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
_______________________________________________
rap-dev mailing list
rap-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/rap-dev
--
------------------------------------------------------------------------
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