#include <State.hh>
Collaboration diagram for pdf::graph::CState:
this class represents the PDF graph state. it contains information like line width, line cap style etc.
|
default constructor. it will ininitalize the members to their PDF default values.
00036 : m_line_width( 1.0f ), m_line_cap( butt_cap ), 00037 m_line_join( mitter_join ), m_miter_limit( 10.0f ), 00038 m_flatness( 1.0f ) 00039 { 00040 } |
|
constructor initializes all members with parameters.
00057 : m_line_width( line_width ), m_line_cap( line_cap ), 00058 m_line_join( line_join ), m_miter_limit( miter_limit ), 00059 m_flatness( flatness ) 00060 { 00061 } |
|
copy constructor.
00066 : m_line_width( state.m_line_width ), 00067 m_line_cap( state.m_line_cap ), 00068 m_line_join( state.m_line_join ), 00069 m_miter_limit( state.m_miter_limit ), 00070 m_pattern( state.m_pattern ), 00071 m_flatness( state.m_flatness ), 00072 m_line_colour( state.m_line_colour ), 00073 m_fill_colour( state.m_fill_colour ) 00074 { 00075 } |
|
destructor does nothing
00080 { 00081 } |
|
print the state into an output stream. like CTextState::Print(), this function takes the previous state as parameter. only the difference between the previous state will be printed.
00108 { 00109 if ( m_line_width != prev.m_line_width ) 00110 os << m_line_width << " w\n" ; 00111 00112 if ( m_line_colour != prev.m_line_colour ) 00113 os << m_line_colour << " RG\n" ; 00114 00115 if ( m_fill_colour != prev.m_fill_colour ) 00116 os << m_fill_colour << " RG\n" ; 00117 00118 if ( m_line_cap != prev.m_line_cap ) 00119 os << m_line_cap << " J\n" ; 00120 00121 if ( m_line_join != prev.m_line_join ) 00122 os << m_line_join << " j\n" ; 00123 00124 if ( m_miter_limit != prev.m_miter_limit ) 00125 os << m_miter_limit << " M\n" ; 00126 00127 if ( m_pattern != prev.m_pattern ) 00128 os << m_pattern ; 00129 00130 if ( m_flatness != prev.m_flatness ) 00131 os << m_flatness << " i\n" ; 00132 00133 return os ; 00134 } |