| From: | |
| Date: | 05 Feb 2001 at 18:45:28 |
| Subject: | ObtainBestPen Again |
Hello Allan
On 02-Feb-01, Allan Odgaard wrote:
> Hello Jack,
>
>> Then I don't understand how the function works. I thought it
>> just returned a value of one pen that approximates what you
>> asked for? [...]
>
> Indeed, but if no match (precise enough) is found, a new pen is
> allocated. Granted more free colours exist in the palette.
I'm trying to use this to solve my screen color problems. I tried
getting a color like red to make sure I was doing it correctly
but no matter what I do, the number one pen is returned. I am
using a copy of the workbench colors to set this up and the
number one pen is black. The syntax I'm using is
color = ObtainBestPen( colormap, 0xFFFFFFFF, 0x0, 0x0,
OBP_Precision, PRECISION_GUI, OBP_FailIfBad, TRUE)
I have also used the example you listed in an earlier thread of
#define FULL9x0 9x*0x01010101)
then
color = ObtainBestPen( colormap, FULL(255), FULL(0), FULL(0),
OBP_Precision, PRECISION_GUI, OBP_FailIfBad, TRUE)
In either case, the result is 1. Actually, if I move the values around,
to say FULL(0), FULL(0), FULL(255), the result is still 1. Any
idea where my problem is?
Jack
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981399004/
---------------------------------------------------------------------_->