Re: [AD] al_clear

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 2009-03-13 at 08:19 +1100, Peter Wang wrote:
> 
> At some stage (soon) the user will learn about al_set_target_bitmap().
> al_clear_target_bitmap() should sound right then.
> 

Well, there's only some special cases why you would want to draw into a
bitmap - so many users might never. But that's not the problem I see
with the name anyway. To me it just doesn't go with the other functions
because it describing a technical detail in its name (*every* drawing
function draws to the target bitmap anyway so there's no need to say so,
this would be the first one which would). Not sure it's clear what I
mean.

Some more suggestions I could offer:

al_clear_background()
(instead of "target bitmap" (redundant, and technical) or "screen" (i
still like this myself) call the target bitmap now "background" :P)

al_clear_to_color()
al_fill_with_color()
al_paint_color()
(those 3 emphasize that a color parameter is used so it gets clear they
are drawing functions)

Anyway, my concern with "target_bitmap" is very small, I won't mind if
it's named that.

There's much worse naming problems than "al_clear" in the API right now
anyway - we didn't even solve the question whether we want to prefix
subsystems (al_config_get_value) or not so far, let alone the naming of
addon functions (al_font_load_font o_O).

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/