|
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2012 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 00071 Type GetType() const; 00072 00076 SDF::Obj GetSDFObj (); 00077 00086 Common::Matrix2D GetMatrix(); 00087 00088 00089 // Specific ShadingPattern methods ----------------------------------------------- 00090 00096 Shading GetShading(); 00097 00098 00099 // Specific TilingPattern methods ------------------------------------------------ 00100 00101 enum TilingType 00102 { 00103 e_constant_spacing, 00104 e_no_distortion, 00105 e_constant_spacing_fast_fill 00106 }; 00107 00114 TilingType GetTilingType() const; 00115 00124 Rect GetBBox(); 00125 00136 double GetXStep(); 00137 00144 double GetYStep(); 00145 00149 void Destroy(); 00150 00152 #ifndef SWIGHIDDEN 00153 PatternColor(TRN_PatternColor impl); 00154 PatternColor(); 00155 TRN_PatternColor mp_pc; 00156 #endif 00158 }; 00159 00160 00161 00162 #include <Impl/PatternColor.inl> 00163 00164 00165 }; // namespace PDF 00166 }; // namespace pdftron 00167 00168 #endif 00169