Changeset 1876
- Timestamp:
- 11/04/07 10:56:40 (6 years ago)
- File:
-
- 1 edited
-
libcaca/trunk/cucul/dither.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/dither.c
r1870 r1876 126 126 void (*get_hsv)(cucul_dither_t *, char *, int, int); 127 127 int red[256], green[256], blue[256], alpha[256]; 128 float gamma; 128 129 /* Colour features */ 130 float gamma, brightness, contrast; 129 131 int gammatab[4097]; 130 132 … … 325 327 } 326 328 329 /* Default gamma value */ 330 d->gamma = 1.0; 331 for(i = 0; i < 4096; i++) 332 d->gammatab[i] = i; 333 334 /* Default colour properties */ 335 d->brightness = 1.0; 336 d->contrast = 1.0; 337 327 338 /* Default features */ 328 339 d->invert = 0; 329 340 d->antialias = 1; 330 331 /* Default gamma value */332 for(i = 0; i < 4096; i++)333 d->gammatab[i] = i;334 341 335 342 /* Default colour mode */ … … 416 423 { 417 424 /* FIXME */ 425 d->brightness = brightness; 426 418 427 return 0; 419 428 } … … 430 439 float cucul_get_dither_brightness(cucul_dither_t *d) 431 440 { 432 /* FIXME */ 433 return 0.0; 441 return d->brightness; 434 442 } 435 443 … … 500 508 { 501 509 /* FIXME */ 510 d->contrast = contrast; 511 502 512 return 0; 513 } 514 515 /** \brief Get the contrast of a dither object. 516 * 517 * Get the contrast of the given dither object. 518 * 519 * This function never fails. 520 * 521 * \param d Dither object. 522 * \return Contrast value. 523 */ 524 float cucul_get_dither_contrast(cucul_dither_t *d) 525 { 526 return d->contrast; 503 527 } 504 528
Note: See TracChangeset
for help on using the changeset viewer.
