00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #ifndef __PDF_GRAPH_STATE_HEADER_INCLUDED__
00027 #define __PDF_GRAPH_STATE_HEADER_INCLUDED__
00028
00029 #ifndef __PDF_UTIL_COLOUR_HEADER_INCLUDED__
00030 #include "util/Colour.hh"
00031 #endif
00032
00033 #ifndef __PDF_UTIL_MATRIX2D_HEADER_INCLUDED__
00034 #include "util/Matrix2D.hh"
00035 #endif
00036
00037 #ifndef __PDF_GRAPH_DASH_HEADER_INCLUDED__
00038 #include "Dash.hh"
00039 #endif
00040
00041 #include <iosfwd>
00042
00043 namespace pdf { namespace graph {
00044
00052 class CState
00053 {
00054 public :
00055 enum ECapStyle { butt_cap = 0, round_cap = 1, square_cap = 2 } ;
00056 enum EJoinStyle { mitter_join = 0, round_join = 1, bevel_join = 2 } ;
00057
00058 private :
00059 double m_line_width ;
00060 ECapStyle m_line_cap ;
00061 EJoinStyle m_line_join ;
00062 double m_miter_limit ;
00063 CDash m_pattern ;
00064
00065
00066
00067
00068 double m_flatness ;
00069
00070 util::CMatrix2D m_transform ;
00071
00072 util::CColour m_line_colour, m_fill_colour ;
00073
00074 public :
00075 CState( ) ;
00076 CState( double line_width, ECapStyle line_cap = butt_cap,
00077 EJoinStyle line_join = mitter_join, double miter_limit = 10.0f,
00078 const CDash& dash = CDash( ), double flatness = 1.0f ) ;
00079 CState( const CState& state ) ;
00080 ~CState( ) ;
00081
00082 CState& operator=( const CState& state ) ;
00083 void Swap( CState& state ) ;
00084
00085 std::ostream& Print( std::ostream& os, const CState& prev ) const ;
00086
00087 const util::CColour& LineColour( ) const ;
00088 void LineColour( const util::CColour& colour ) ;
00089
00090 const util::CColour& FillColour( ) const ;
00091 void FillColour( const util::CColour& colour ) ;
00092 } ;
00093
00094
00095
00096
00097
00098
00099
00100 } }
00101
00102 #endif