![]() |
How to use CXTPOffice2007Image::GetBitmapPixel |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() Posted: 11 February 2010 at 4:40pm |
I want to draw a background gradient that matches the colors of a ribbon bar group. But I don't know how to call GetBitmapPixel. I am trying to call GetBitmapPixel with the correct "point" coordinates. I can draw the image calling like this:
pImage->DrawImage(pDC, rcClient, pImage->GetSource(0,2), CRect(0,0,0,0));
and I see what appears to be the image I see when the ribbon draws a non-highlighted group (background). I cannot seem to find the correct offset point to pass GetBitmapPixel.
It also appears that the pixel returned is not in RGB format but rather is in BGR (I can only come close to the colors I see when I draw the image if I swap the red and green when calling the GDI GradientFill API.)
Can I call GetBitmapPixel to get the values I need? If not, how can I get the colors of the two "inner bands" that I see a group image contains.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |