#include <src/agg/agg_color_gray.h>
|
| static value_type | luminance (double r, double g, double b) |
| |
| static value_type | luminance (const rgba &c) |
| |
| static value_type | luminance (const rgba32 &c) |
| |
| static value_type | luminance (const rgba8 &c) |
| |
| static value_type | luminance (const rgba16 &c) |
| |
| static AGG_INLINE double | to_double (value_type a) |
| |
| static AGG_INLINE value_type | from_double (double a) |
| |
| static AGG_INLINE value_type | empty_value () |
| |
| static AGG_INLINE value_type | full_value () |
| |
| static AGG_INLINE value_type | invert (value_type x) |
| |
| static AGG_INLINE value_type | multiply (value_type a, value_type b) |
| |
| static AGG_INLINE value_type | demultiply (value_type a, value_type b) |
| |
| template<typename T > |
| static AGG_INLINE T | downscale (T a) |
| |
| template<typename T > |
| static AGG_INLINE T | downshift (T a, unsigned n) |
| |
| static AGG_INLINE value_type | mult_cover (value_type a, cover_type b) |
| |
| static AGG_INLINE cover_type | scale_cover (cover_type a, value_type b) |
| |
| static AGG_INLINE value_type | prelerp (value_type p, value_type q, value_type a) |
| |
| static AGG_INLINE value_type | lerp (value_type p, value_type q, value_type a) |
| |
| static self_type | no_color () |
| |
◆ calc_type
◆ long_type
◆ self_type
◆ value_type
◆ gray32() [1/11]
◆ gray32() [2/11]
786 :
value_type v
Definition agg_color_gray.h:753
value_type a
Definition agg_color_gray.h:754
◆ gray32() [3/11]
◆ gray32() [4/11]
794 :
float value_type
Definition agg_color_gray.h:748
static value_type luminance(double r, double g, double b)
Definition agg_color_gray.h:757
◆ gray32() [5/11]
◆ gray32() [6/11]
◆ gray32() [7/11]
◆ gray32() [8/11]
◆ gray32() [9/11]
◆ gray32() [10/11]
824 :
825 v(sRGB_conv<value_type>::rgb_from_sRGB(
c.v)),
826 a(sRGB_conv<value_type>::alpha_from_sRGB(
c.a)) {}
◆ gray32() [11/11]
◆ clear()
987 {
989 return *this;
990 }
References a, and v.
◆ demultiply() [1/2]
1025 {
1027 else if (
a < 1)
v /=
a;
1028 return *this;
1029 }
References a, and v.
◆ demultiply() [2/2]
◆ downscale()
◆ downshift()
template<typename T >
| static AGG_INLINE T agg::gray32::downshift |
( |
T |
a, |
|
|
unsigned |
n |
|
) |
| |
|
inlinestatic |
951 {
952 return n > 0 ?
a / (1 << n) :
a;
953 }
References a.
◆ empty_value()
901 {
902 return 0;
903 }
◆ from_double()
◆ full_value()
907 {
908 return 1;
909 }
◆ gradient()
1033 {
1037 }
gray32 self_type
Definition agg_color_gray.h:751
References a, and v.
◆ invert()
925 {
927 }
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297
◆ is_opaque()
◆ is_transparent()
| AGG_INLINE bool agg::gray32::is_transparent |
( |
| ) |
const |
|
inline |
◆ lerp()
977 {
978
979
980
981
982 return (1 -
a) * p +
a * q;
983 }
References a.
◆ luminance() [1/5]
◆ luminance() [2/5]
◆ luminance() [3/5]
◆ luminance() [4/5]
◆ luminance() [5/5]
| static value_type agg::gray32::luminance |
( |
double |
r, |
|
|
double |
g, |
|
|
double |
b |
|
) |
| |
|
inlinestatic |
◆ mult_cover()
957 {
959 }
@ cover_mask
Definition agg_basics.h:242
References a, and agg::cover_mask.
◆ multiply()
◆ no_color()
◆ opacity() [1/2]
| double agg::gray32::opacity |
( |
| ) |
const |
|
inline |
◆ opacity() [2/2]
| self_type & agg::gray32::opacity |
( |
double |
a_ | ) |
|
|
inline |
1001 {
1003 else if (a_ > 1)
a = 1;
1005 return *this;
1006 }
References a.
◆ operator gray16()
| agg::gray32::operator gray16 |
( |
| ) |
const |
|
inline |
856 {
858 }
AGG_INLINE int uround(double v)
Definition agg_basics.h:192
References a, agg::uround(), and v.
◆ operator gray8()
| agg::gray32::operator gray8 |
( |
| ) |
const |
|
inline |
841 {
843 }
gray8T< linear > gray8
Definition agg_color_gray.h:414
References a, agg::uround(), and v.
◆ operator rgba()
| agg::gray32::operator rgba |
( |
| ) |
const |
|
inline |
835 {
836 return rgba(
v,
v,
v,
a);
837 }
References a, and v.
◆ operator rgba16()
| agg::gray32::operator rgba16 |
( |
| ) |
const |
|
inline |
876 {
878 return rgba16(y, y, y,
uround(
a * 65535.0));
879 }
const Scalar & y
Definition MathFunctions.h:552
int16u value_type
Definition agg_color_rgba.h:664
References a, agg::uround(), and v.
◆ operator rgba32()
| agg::gray32::operator rgba32 |
( |
| ) |
const |
|
inline |
883 {
884 return rgba32(
v,
v,
v,
a);
885 }
References a, and v.
◆ operator rgba8()
| agg::gray32::operator rgba8 |
( |
| ) |
const |
|
inline |
862 {
865 }
rgba8T< linear > rgba8
Definition agg_color_rgba.h:623
int8u value_type
Definition agg_color_rgba.h:248
References a, agg::uround(), and v.
◆ operator sgray8()
| agg::gray32::operator sgray8 |
( |
| ) |
const |
|
inline |
847 {
848
850 sRGB_conv<value_type>::rgb_to_sRGB(
v),
851 sRGB_conv<value_type>::alpha_to_sRGB(
a));
852 }
gray8T< sRGB > sgray8
Definition agg_color_gray.h:415
References a, and v.
◆ operator srgba8()
| agg::gray32::operator srgba8 |
( |
| ) |
const |
|
inline |
869 {
871 return srgba8(y, y, y, sRGB_conv<value_type>::alpha_to_sRGB(
a));
872 }
rgba8T< sRGB > srgba8
Definition agg_color_rgba.h:624
References a, and v.
◆ prelerp()
970 {
971 return (1 -
a) * p + q;
972 }
References a.
◆ premultiply()
1017 {
1019 else if(
a < 1)
v *=
a;
1020 return *this;
1021 }
References a, and v.
◆ scale_cover()
963 {
965 }
unsigned char cover_type
Definition agg_basics.h:237
References a, and agg::uround().
◆ to_double()
◆ transparent()
994 {
996 return *this;
997 }
References a.
Referenced by clear(), demultiply(), demultiply(), downscale(), downshift(), from_double(), gradient(), is_opaque(), is_transparent(), lerp(), mult_cover(), multiply(), opacity(), opacity(), operator gray16(), operator gray8(), operator rgba(), operator rgba16(), operator rgba32(), operator rgba8(), operator sgray8(), operator srgba8(), prelerp(), premultiply(), scale_cover(), to_double(), and transparent().
Referenced by clear(), demultiply(), gradient(), operator gray16(), operator gray8(), operator rgba(), operator rgba16(), operator rgba32(), operator rgba8(), operator sgray8(), operator srgba8(), and premultiply().
The documentation for this struct was generated from the following file: