Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Hi,
in ColorHanlder.java, method dump() the following should be changed
// String clr = "#"+Integer.toString(value.getRed(), 16)+
// Integer.toString(value.getGreen(), 16)+
// Integer.toString(value.getBlue(), 16)+
// Integer.toString(value.getAlpha(), 16);
int col = 0x1000000 * value.getRed();
col += 0x10000 * value.getGreen();
col += 0x100 * value.getBlue();
col += value.getAlpha();
String clr = "#" + Integer.toHexString(col);
cheers
Frank
Original comment by Dietrich.Frank@gmail.com
on 17 Jan 2011 at 12:22
Actually, it's a bit different for android. As stated here at
http://developer.android.com/reference/android/graphics/Color.html,
"The components are stored as follows (alpha << 24) | (red << 16) | (green <<
8) | blue."
So the method should be changed to
String clr = String.format("#%02x%02x%02x%02x", value.getAlpha(), value.getRed(), value.getGreen(), value.getBlue());
br
Ales
Original comment by ales.vol...@gmail.com
on 17 Jan 2011 at 2:18
Thanks this has been now fixed in SVN and will roll out with the next release.
Next time, feel free to send a patch if you want.
Thanks
--brendan
Original comment by brendan....@gmail.com
on 28 Dec 2011 at 6:17
Original issue reported on code.google.com by
ales.vol...@gmail.com
on 14 Jan 2011 at 11:16