|
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2008 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 enum Type 00059 { 00060 e_uncolored_tiling_pattern, 00061 e_colored_tiling_pattern, 00062 e_shading, 00063 e_null 00064 }; 00065 00070 static Type GetType(SDF::Obj pattern); 00071 00072 00076 Type GetType() const; 00077 00081 SDF::Obj GetSDFObj (); 00082 00091 Common::Matrix2D GetMatrix(); 00092 00093 00094 // Specific ShadingPattern methods ----------------------------------------------- 00095 00101 Shading GetShading(); 00102 00103 00104 // Specific TilingPattern methods ------------------------------------------------ 00105 00106 enum TilingType 00107 { 00108 e_constant_spacing, 00109 e_no_distortion, 00110 e_constant_spacing_fast_fill 00111 }; 00112 00119 TilingType GetTilingType() const; 00120 00129 Rect GetBBox(); 00130 00141 double GetXStep(); 00142 00149 double GetYStep(); 00150 00152 PatternColor(TRN_PatternColor impl); 00153 TRN_PatternColor mp_pc; 00155 }; 00156 00157 00158 00159 #include <Impl/PatternColor.inl> 00160 00161 00162 }; // namespace PDF 00163 }; // namespace pdftron 00164 00165 #endif 00166