lemon/eps.h
changeset 2068 6936f130bba2
parent 1971 9a59a6cacfd9
child 2084 59769591eb60
equal deleted inserted replaced
0:3de16bf02b33 1:f5c718969fe0
    47     bool local_stream;
    47     bool local_stream;
    48   public:
    48   public:
    49     
    49     
    50     std::ostream &out;
    50     std::ostream &out;
    51     
    51     
       
    52     ///Node shapes
       
    53     ///
       
    54     enum NodeShapes { 
       
    55       /// = 0
       
    56       ///\image html nodeshape_0.png
       
    57       ///\image latex nodeshape_0.eps "CIRCLE shape (0)" width=2cm
       
    58       CIRCLE=0, 
       
    59       /// = 1
       
    60       ///\image html nodeshape_1.png
       
    61       ///\image latex nodeshape_1.eps "SQUARE shape (1)" width=2cm
       
    62       ///
       
    63       SQUARE=1, 
       
    64       /// = 2
       
    65       ///\image html nodeshape_2.png
       
    66       ///\image latex nodeshape_2.eps "DIAMOND shape (2)" width=2cm
       
    67       ///
       
    68       DIAMOND=2,
       
    69       /// = 3
       
    70       ///\image html nodeshape_3.png
       
    71       ///\image latex nodeshape_2.eps "MALE shape (4)" width=2cm
       
    72       ///
       
    73       ///\warning Not implemented
       
    74       MALE=3,
       
    75       /// = 4
       
    76       ///\image html nodeshape_4.png
       
    77       ///\image latex nodeshape_2.eps "FEMALE shape (4)" width=2cm
       
    78       ///
       
    79       ///\warning Not implemented
       
    80       FEMALE=4
       
    81     };
    52     ///\e 
    82     ///\e 
    53 
    83 
    54     ///The generated file is put to \c os.
    84     ///The generated file is put to \c os.
    55     ///
    85     ///
    56     /// \c x and \c y determine the upper
    86     /// \c x and \c y determine the upper
   244     EpsDrawer &color(Color c)
   274     EpsDrawer &color(Color c)
   245     {
   275     {
   246       return color(c.red(),c.green(),c.blue());
   276       return color(c.red(),c.green(),c.blue());
   247     }
   277     }
   248     
   278     
       
   279     ///Draw a node shape
       
   280 
       
   281     ///Draw a node shape.
       
   282     ///
       
   283     ///\param t The shape of the drawn object
       
   284     ///\param x The \c x coordinate of the node
       
   285     ///\param y The \c y coordinate of the node
       
   286     ///\param col Color of the node. The default color is white
       
   287     ///\param brd Color of the node border. The default color is black
       
   288     EpsDrawer &node(NodeShapes t, double x, double y, double r,
       
   289 		    Color col=Color(1,1,1), Color brd=Color(0,0,0));
       
   290     ///Draw a node shape
       
   291     
       
   292     ///Draw a node shape.
       
   293     ///
       
   294     ///\param t The shape of the drawn object
       
   295     ///\param pos Position of the node
       
   296     ///\param col Color of the node. The default color is white
       
   297     ///\param brd Color of the node border. The default color is black
       
   298     template<class T>
       
   299     EpsDrawer &node(NodeShapes t, xy<T> pos, double r,
       
   300 		    Color col=Color(1,1,1), Color brd=Color(0,0,0))
       
   301     {
       
   302       return node(t,pos.x,pos.y,r,col,brd);
       
   303     }
       
   304 
   249     ///Translate the coordinate system
   305     ///Translate the coordinate system
   250     EpsDrawer &translate(double x,double y);
   306     EpsDrawer &translate(double x,double y);
   251     ///Translate the coordinate system
   307     ///Translate the coordinate system
   252     template<class T> EpsDrawer &translate(xy<T> p)
   308     template<class T> EpsDrawer &translate(xy<T> p)
   253     {
   309     {