The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


what does that exactly mean?

Posted by Ilya Schabanov on October 07, 2001 at 11:06 AM

Is there anyone who can explain me what this exactly means...
(i know the result...but cant understand how it comes to it)
using the pixelgrabber class i grab a pixel...
and extract the colors....hmm...i copied this from an example...and dont understand what the operators mean and what for is everything
int p=_pixels[index];
_alpha = (p >> 24) & 0xff;
_red = (p >> 16) & 0xff;
_green = (p >> 8) & 0xff;
_blue = (p ) & 0xff;
i get the right values for the colors... but how??
what does the '>>' mean and what for is '&', how do they exactly work?


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us