C (58/257)

From:
Date:06 Feb 2001 at 03:28:41
Subject:Re: ObtainBestPen Again

On 06-Feb-01, Jack York wrote:
> 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

Here are a couple of modules I snipped from a working program,
I hope this helps....

Regards



_________________________________________

Colin Wenzel. Quensland, Australia.

EMAIL: colstv@hotkey.net.au
URL: http://www.hotkey.net.au/~colstv/
AMIGA: 4000T, 68060/50, 150Mb RAM,
OS 3.9, Spectrum Gfx Card + P96.

Need an Image Generator For CATV ??
http://connect.to/products
_________________________________________

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981426544/
---------------------------------------------------------------------_->