Dan Pidcock
2004-02-09 10:17:51 UTC
Anybody still here??
I have some problems with using SetBits. I thought that the following
is the way to do it:
uint8 pixel[3]; // is ushort also 8 bits??
pixel[0] = 255; // red?
pixel[1] = 0; // green?
pixel[2] = 255; // blue?
// data length offset mode
bitmap->SetBits(pixel, 3, 100, B_RGB32)
I expected this to set the pixel to a magenta colour but it doesn't.
Changing the colours I can't yet work out what is going on and the
BeBook doesn't really explain this. I guess I have misunderstood the
byte to colour mapping?
Oh yes I intend to use Bits() in the long run but though it would be
easier to first get it working with SetBits().
Thanks,
Dan
I have some problems with using SetBits. I thought that the following
is the way to do it:
uint8 pixel[3]; // is ushort also 8 bits??
pixel[0] = 255; // red?
pixel[1] = 0; // green?
pixel[2] = 255; // blue?
// data length offset mode
bitmap->SetBits(pixel, 3, 100, B_RGB32)
I expected this to set the pixel to a magenta colour but it doesn't.
Changing the colours I can't yet work out what is going on and the
BeBook doesn't really explain this. I guess I have misunderstood the
byte to colour mapping?
Oh yes I intend to use Bits() in the long run but though it would be
easier to first get it working with SetBits().
Thanks,
Dan