Luke Crook | 4 Nov 2008 02:36
Gravatar

Re: Missing get-color-key

On Mon, 03 Nov 2008 16:37:36 -0800, Elliott Slaughter  
<elliottslaughter@...> wrote:

> On Mon, Nov 3, 2008 at 3:37 PM, Luke Crook <luke@...> wrote:
>
>> (color-key-p *blah*)
>> (setf (color-key-p *blah*) *color*)
>>
>
> So color-key-p returns the color-key, right?

Correct.

> Why the "-p"; is it a
> predicate? (enable-color-key-p is a predicate, right?)

I have been going back and forth on appending the "-p" on the defsetf form.

Anyone have any feelings on;

    (setf (color-key *blah*) *color*), versus
    (setf (color-key-p *blah*) *color*)

Same goes for enable-color-key-p, enable-alpha-p, surface-alpha-p and  
rle-accel-p as these all have defsetf forms.

- Luke
Justin Heyes-Jones | 4 Nov 2008 03:39
Picon
Gravatar

Re: Missing get-color-key

2008/11/3 Luke Crook <luke@...>:
> Anyone have any feelings on;
>
>    (setf (color-key *blah*) *color*), versus
>    (setf (color-key-p *blah*) *color*)
>
> Same goes for enable-color-key-p, enable-alpha-p, surface-alpha-p and
> rle-accel-p as these all have defsetf forms.
>
> - Luke

I don't have strong feelings on this, but it seems like if you can set
it, then it shouldn't have the -p postfix.

Does color-key-p currently return the color key on a surface?

Justin
Luke Crook | 4 Nov 2008 03:42
Gravatar

Re: Missing get-color-key

On Mon, 03 Nov 2008 18:39:23 -0800, Justin Heyes-Jones  
<justinhj@...> wrote:

>
> Does color-key-p currently return the color key on a surface?

Yup.

Now that I actually think about this, what business does a predicate "-p"  
have returning the color-key of a surface?

color-key-p should mean, "is this a object a type-of COLOR-KEY". Which is  
clearly is not. Back to the drawing board.

- Luke

Gmane