#include <src/agg/agg_color_gray.h>
◆ calc_type
◆ long_type
◆ self_type
◆ value_type
◆ base_scale_e
| Enumerator |
|---|
| base_shift | |
| base_scale | |
| base_mask | |
| base_MSB | |
425 {
430 };
@ base_scale
Definition agg_color_gray.h:427
@ base_MSB
Definition agg_color_gray.h:429
@ base_mask
Definition agg_color_gray.h:428
@ base_shift
Definition agg_color_gray.h:426
◆ gray16() [1/9]
◆ gray16() [2/9]
| agg::gray16::gray16 |
( |
unsigned |
v_, |
|
|
unsigned |
a_ = base_mask |
|
) |
| |
|
inlineexplicit |
467 :
AGG_INT16U int16u
Definition agg_basics.h:122
value_type v
Definition agg_color_gray.h:433
value_type a
Definition agg_color_gray.h:434
◆ gray16() [3/9]
471 :
int16u value_type
Definition agg_color_gray.h:421
◆ gray16() [4/9]
475 :
AGG_INLINE int uround(double v)
Definition agg_basics.h:192
static value_type luminance(const rgba &c)
Definition agg_color_gray.h:436
◆ gray16() [5/9]
◆ gray16() [6/9]
◆ gray16() [7/9]
◆ gray16() [8/9]
◆ gray16() [9/9]
500 :
501 v(sRGB_conv<value_type>::rgb_from_sRGB(
c.v)),
502 a(sRGB_conv<value_type>::alpha_from_sRGB(
c.a)) {}
◆ add()
716 {
719 {
721 {
723 return;
724 }
725 else
726 {
729 }
730 }
731 else
732 {
735 }
738 }
@ cover_mask
Definition agg_basics.h:242
static AGG_INLINE value_type mult_cover(value_type a, cover_type b)
Definition agg_color_gray.h:619
int32u calc_type
Definition agg_color_gray.h:422
References a, base_mask, agg::cover_mask, mult_cover(), and v.
◆ clear()
647 {
649 return *this;
650 }
References a, and v.
◆ demultiply() [1/2]
688 {
690 {
692 {
694 }
695 else
696 {
699 }
700 }
701 return *this;
702 }
References a, base_mask, and v.
◆ demultiply() [2/2]
590 {
592 {
593 return 0;
594 }
596 {
598 }
600 }
References a, and base_mask.
◆ downscale()
◆ downshift()
template<typename T >
| static AGG_INLINE T agg::gray16::downshift |
( |
T |
a, |
|
|
unsigned |
n |
|
) |
| |
|
inlinestatic |
◆ empty_value()
558 {
559 return 0;
560 }
◆ from_double()
◆ full_value()
◆ gradient()
706 {
711 return ret;
712 }
static AGG_INLINE value_type lerp(value_type p, value_type q, value_type a)
Definition agg_color_gray.h:639
gray16 self_type
Definition agg_color_gray.h:431
References a, base_scale, lerp(), agg::uround(), and v.
◆ is_opaque()
◆ is_transparent()
| AGG_INLINE bool agg::gray16::is_transparent |
( |
| ) |
const |
|
inline |
◆ lerp()
◆ luminance() [1/5]
◆ luminance() [2/5]
443 {
444
445 return value_type((13933u *
c.r + 46872u *
c.g + 4732u *
c.b) >> 16);
446 }
◆ luminance() [3/5]
◆ luminance() [4/5]
◆ luminance() [5/5]
◆ mult_cover()
620 {
622 }
static AGG_INLINE value_type multiply(value_type a, value_type b)
Definition agg_color_gray.h:582
References a, and multiply().
Referenced by add(), and scale_cover().
◆ multiply()
◆ no_color()
◆ opacity() [1/2]
| double agg::gray16::opacity |
( |
| ) |
const |
|
inline |
◆ opacity() [2/2]
| self_type & agg::gray16::opacity |
( |
double |
a_ | ) |
|
|
inline |
◆ operator gray8()
| agg::gray16::operator gray8 |
( |
| ) |
const |
|
inline |
532 {
534 }
gray8T< linear > gray8
Definition agg_color_gray.h:414
References a, and v.
◆ operator rgba16()
| agg::gray16::operator rgba16 |
( |
| ) |
const |
|
inline |
519 {
520 return rgba16(
v,
v,
v,
a);
521 }
References a, and v.
◆ operator rgba32()
| agg::gray16::operator rgba32 |
( |
| ) |
const |
|
inline |
525 {
527 return rgba32(v32, v32, v32,
a / 65535.0f);
528 }
float value_type
Definition agg_color_rgba.h:1033
References a, and v.
◆ operator rgba8()
| agg::gray16::operator rgba8 |
( |
| ) |
const |
|
inline |
506 {
507 return rgba8(
v >> 8,
v >> 8,
v >> 8,
a >> 8);
508 }
rgba8T< linear > rgba8
Definition agg_color_rgba.h:623
References a, and v.
◆ operator sgray8()
| agg::gray16::operator sgray8 |
( |
| ) |
const |
|
inline |
538 {
540 sRGB_conv<value_type>::rgb_to_sRGB(
v),
541 sRGB_conv<value_type>::alpha_to_sRGB(
a));
542 }
gray8T< sRGB > sgray8
Definition agg_color_gray.h:415
References a, and v.
◆ operator srgba8()
| agg::gray16::operator srgba8 |
( |
| ) |
const |
|
inline |
512 {
514 return srgba8(y, y, y, sRGB_conv<value_type>::alpha_to_sRGB(
a));
515 }
const Scalar & y
Definition MathFunctions.h:552
rgba8T< sRGB > srgba8
Definition agg_color_rgba.h:624
References a, and v.
◆ prelerp()
◆ premultiply()
◆ scale_cover()
◆ to_double()
◆ transparent()
654 {
656 return *this;
657 }
References a.
Referenced by add(), clear(), demultiply(), demultiply(), downscale(), downshift(), from_double(), gradient(), is_opaque(), is_transparent(), lerp(), mult_cover(), multiply(), opacity(), opacity(), operator gray8(), operator rgba16(), operator rgba32(), operator rgba8(), operator sgray8(), operator srgba8(), prelerp(), premultiply(), scale_cover(), to_double(), and transparent().
Referenced by add(), clear(), demultiply(), gradient(), operator gray8(), operator rgba16(), operator rgba32(), operator rgba8(), operator sgray8(), operator srgba8(), and premultiply().
The documentation for this struct was generated from the following file: