1 2 //---------------------------------------------------------------------------- 3 // Anti-Grain Geometry - Version 2.3 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 5 // 6 // Permission to copy, use, modify, sell and distribute this software 7 // is granted provided this copyright notice appears in all copies. 8 // This software is provided "as is" without express or implied 9 // warranty, and with no claim as to its suitability for any purpose. 10 // 11 //---------------------------------------------------------------------------- 12 // Contact: [email protected] 13 // [email protected] 14 // http://www.antigrain.com 15 //---------------------------------------------------------------------------- 16 // 17 // Adaptation for high precision colors has been sponsored by 18 // Liberty Technology Systems, Inc., visit http://lib-sys.com 19 // 20 // Liberty Technology Systems, Inc. is the provider of 21 // PostScript and PDF technology for software developers. 22 // 23 //---------------------------------------------------------------------------- 24 // 25 // color types gray8, gray16 26 // 27 //---------------------------------------------------------------------------- 28 #ifndef AGG_COLOR_GRAY_INCLUDED 29 #define AGG_COLOR_GRAY_INCLUDED 30 #include "agg_basics.h" 31 namespace pdfium 32 { 33 namespace agg 34 { 35 struct gray8 { 36 typedef int8u value_type; 37 typedef int32u calc_type; 38 typedef int32 long_type; 39 enum base_scale_e { 40 base_shift = 8, 41 base_size = 1 << base_shift, 42 base_mask = base_size - 1 43 }; 44 typedef gray8 self_type; 45 value_type v; 46 value_type a; gray8gray847 gray8() {} 48 gray8(unsigned v_, unsigned a_ = base_mask) : vgray849 v(int8u(v_)), a(int8u(a_)) {} 50 }; 51 } 52 } // namespace pdfium 53 #endif 54