Anti-Grain Geometry Tutorial
agg::gray8T< Colorspace > Struct Template Reference

Public Types

enum  base_scale_e { base_shift = 8, base_scale = 1 << base_shift, base_mask = base_scale - 1, base_MSB = 1 << (base_shift - 1) }
 
typedef int8u value_type
 
typedef int32u calc_type
 
typedef int32 long_type
 
typedef gray8T self_type
 

Public Member Functions

 gray8T (unsigned v_, unsigned a_=base_mask)
 
 gray8T (const self_type &c, unsigned a_)
 
 gray8T (const rgba &c)
 
template<class T >
 gray8T (const gray8T< T > &c)
 
template<class T >
 gray8T (const rgba8T< T > &c)
 
template<class T >
convert_from_sRGB () const
 
template<class T >
convert_to_sRGB () const
 
rgba8 make_rgba8 (const linear &) const
 
rgba8 make_rgba8 (const sRGB &) const
 
 operator rgba8 () const
 
srgba8 make_srgba8 (const linear &) const
 
srgba8 make_srgba8 (const sRGB &) const
 
 operator srgba8 () const
 
rgba16 make_rgba16 (const linear &) const
 
rgba16 make_rgba16 (const sRGB &) const
 
 operator rgba16 () const
 
rgba32 make_rgba32 (const linear &) const
 
rgba32 make_rgba32 (const sRGB &) const
 
 operator rgba32 () const
 
AGG_INLINE bool is_transparent () const
 
AGG_INLINE bool is_opaque () const
 
self_typeclear ()
 
self_typetransparent ()
 
self_typeopacity (double a_)
 
double opacity () const
 
self_typepremultiply ()
 
self_typedemultiply ()
 
self_type gradient (self_type c, double k) const
 
AGG_INLINE void add (const self_type &c, unsigned cover)
 

Static Public Member Functions

static value_type luminance (const rgba &c)
 
static value_type luminance (const rgba8 &c)
 
static void convert (gray8T< linear > &dst, const gray8T< sRGB > &src)
 
static void convert (gray8T< sRGB > &dst, const gray8T< linear > &src)
 
static void convert (gray8T< linear > &dst, const rgba8 &src)
 
static void convert (gray8T< linear > &dst, const srgba8 &src)
 
static void convert (gray8T< sRGB > &dst, const rgba8 &src)
 
static void convert (gray8T< sRGB > &dst, const srgba8 &src)
 
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 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, value_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 ()
 

Public Attributes

value_type v
 
value_type a
 

Detailed Description

template<class Colorspace>
struct agg::gray8T< Colorspace >

Definition at line 39 of file agg_color_gray.h.


The documentation for this struct was generated from the following file: