00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #ifndef __PDF_TEXT_STATE_HEADER_INCLUDED__
00027 #define __PDF_TEXT_STATE_HEADER_INCLUDED__
00028
00029 #ifndef __PDF_UTIL_MATRIX2D_HEADER_INCLUDED__
00030 #include "util/Matrix2D.hh"
00031 #endif
00032
00033 #ifndef __PDF_UTIL_COLOUR_HEADER_INCLUDED__
00034 #include "util/Colour.hh"
00035 #endif
00036
00037 #include <iosfwd>
00038 #include <algorithm>
00039
00040 namespace pdf {
00041
00042 namespace font
00043 {
00044 class CFont ;
00045 }
00046
00047 namespace text {
00048
00060 class CState
00061 {
00062 private :
00063 const font::CFont *m_font ;
00064
00065
00066 double m_font_size ;
00067 double m_char_space ;
00068 double m_word_space ;
00069 double m_scale ;
00070 double m_leading ;
00071 int m_render ;
00072 double m_rise ;
00073
00074 util::CColour m_colour ;
00075
00076 public :
00077 CState( ) ;
00078 CState( const font::CFont *font, double font_size,
00079 double leading = 0, double char_space = 0,
00080 double word_space = 0, double scale = 1.0f,
00081 int render = 0, double rise = 0 ) ;
00082 CState( const CState& text ) ;
00083
00084
00085 CState& operator=( const CState& state ) ;
00086 void Swap( CState& state ) ;
00087
00088 std::ostream& Write( std::ostream& os, const CState& prev ) const ;
00089
00091 double Leading( ) const { return m_leading ; }
00092
00093
00094 void Colour( const util::CColour& colour ) ;
00095 const util::CColour Colour( ) const ;
00096
00097 const font::CFont* Font( ) const ;
00098 double Scale( ) const ;
00099 double FontSize( ) const ;
00100 } ;
00101
00102 } }
00103
00104 namespace std
00105 {
00106 template <>
00107 inline void swap( pdf::text::CState& s1, pdf::text::CState& s2 )
00108 {
00109 s1.Swap( s2 ) ;
00110 }
00111 }
00112
00113 #endif