Anti-Grain Geometry Tutorial
agg::gray16 Struct Reference

Public Types

enum  base_scale_e { base_shift = 16, base_scale = 1 << base_shift, base_mask = base_scale - 1, base_MSB = 1 << (base_shift - 1) }
 
typedef int16u value_type
 
typedef int32u calc_type
 
typedef int64 long_type
 
typedef gray16 self_type
 

Public Member Functions

 gray16 (unsigned v_, unsigned a_=base_mask)
 
 gray16 (const self_type &c, unsigned a_)
 
 gray16 (const rgba &c)
 
 gray16 (const rgba8 &c)
 
 gray16 (const srgba8 &c)
 
 gray16 (const rgba16 &c)
 
 gray16 (const gray8 &c)
 
 gray16 (const sgray8 &c)
 
 operator rgba8 () const
 
 operator srgba8 () const
 
 operator rgba16 () const
 
 operator rgba32 () const
 
 operator gray8 () const
 
 operator sgray8 () 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 rgba16 &c)
 
static value_type luminance (const rgba8 &c)
 
static value_type luminance (const srgba8 &c)
 
static value_type luminance (const rgba32 &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 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 ()
 

Public Attributes

value_type v
 
value_type a
 

Detailed Description

Definition at line 419 of file agg_color_gray.h.


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