Changeset 507


Ignore:
Timestamp:
Nov 12, 2005, 3:47:59 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • src/bitmap.c: + Renamed gammaval into gamma. + Fixed Doxygen comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/bitmap.c

    r495 r507  
    171171    void (*get_hsv)(struct caca_bitmap *, char *, int, int);
    172172    int red[256], green[256], blue[256], alpha[256];
    173     float gammaval;
     173    float gamma;
    174174    int gammatab[4097];
    175175};
     
    326326 *
    327327 * \param bitmap Bitmap object.
    328  * \param red Gamma value.
    329  */
    330 void caca_set_bitmap_gamma(struct caca_bitmap *bitmap, float gammaval)
     328 * \param gamma Gamma value.
     329 */
     330void caca_set_bitmap_gamma(struct caca_bitmap *bitmap, float gamma)
    331331{
    332332    int i;
    333333
    334     if(gammaval <= 0.0)
     334    if(gamma <= 0.0)
    335335        return;
    336336
    337     bitmap->gammaval = gammaval;
     337    bitmap->gamma = gamma;
    338338
    339339    for(i = 0; i < 4096; i++)
    340         bitmap->gammatab[i] = 4096.0 * caca_powf((float)i / 4096.0, 1.0 / gammaval);
     340        bitmap->gammatab[i] = 4096.0 * caca_powf((float)i / 4096.0, 1.0 / gamma);
    341341}
    342342
Note: See TracChangeset for help on using the changeset viewer.