![]() |
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2010 by PDFTron Systems Inc. All Rights Reserved. 00003 // Consult legal.txt regarding legal and license information. 00004 //--------------------------------------------------------------------------------------- 00005 00006 #ifndef H_CPPPDFPatternColor 00007 #define H_CPPPDFPatternColor 00008 00009 #include <SDF/Obj.h> 00010 #include <Common/Matrix2D.h> 00011 #include <PDF/Shading.h> 00012 #include <C/PDF/TRN_PatternColor.h> 00013 00014 00015 namespace pdftron { 00016 namespace PDF { 00017 00043 class PatternColor 00044 { 00045 public: 00046 00047 // Common PatternColor methods ---------------------------------------------------- 00048 00053 PatternColor (SDF::Obj pattern); 00054 00055 PatternColor(const PatternColor&); 00056 PatternColor& operator=(const PatternColor&); 00057 00058 ~PatternColor(); 00059 00060 enum Type 00061 { 00062 e_uncolored_tiling_pattern, 00063 e_colored_tiling_pattern, 00064 e_shading, 00065 e_null 00066 }; 00067 00072 static Type GetType(SDF::Obj pattern); 00073 00074 00078 Type GetType() const; 00079 00083 SDF::Obj GetSDFObj (); 00084 00093 Common::Matrix2D GetMatrix(); 00094 00095 00096 // Specific ShadingPattern methods ----------------------------------------------- 00097 00103 Shading GetShading(); 00104 00105 00106 // Specific TilingPattern methods ------------------------------------------------ 00107 00108 enum TilingType 00109 { 00110 e_constant_spacing, 00111 e_no_distortion, 00112 e_constant_spacing_fast_fill 00113 }; 00114 00121 TilingType GetTilingType() const; 00122 00131 Rect GetBBox(); 00132 00143 double GetXStep(); 00144 00151 double GetYStep(); 00152 00154 PatternColor(TRN_PatternColor impl); 00155 TRN_PatternColor mp_pc; 00157 }; 00158 00159 00160 00161 #include <Impl/PatternColor.inl> 00162 00163 00164 }; // namespace PDF 00165 }; // namespace pdftron 00166 00167 #endif 00168