alpar@1971: /* -*- C++ -*-
alpar@1971: *
alpar@1971: * This file is a part of LEMON, a generic C++ optimization library
alpar@1971: *
alpar@2391: * Copyright (C) 2003-2007
alpar@1971: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@1971: * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@1971: *
alpar@1971: * Permission to use, modify and distribute this software is granted
alpar@1971: * provided that this copyright notice appears in all copies. For
alpar@1971: * precise terms see the accompanying LICENSE file.
alpar@1971: *
alpar@1971: * This software is provided "AS IS" with no warranty of any kind,
alpar@1971: * express or implied, and with no claim as to its suitability for any
alpar@1971: * purpose.
alpar@1971: *
alpar@1971: */
alpar@1971:
alpar@1971: /// \ingroup demos
alpar@1971: /// \file
kpeter@2476: /// \brief Demo of the EPS grawing class \ref lemon::EpsDrawer "EpsDrawer".
alpar@1971: ///
alpar@1971: /// This demo program shows examples how to use the class \ref
kpeter@2476: /// lemon::EpsDrawer "EpsDrawer". It takes no input but simply creates
kpeter@2476: /// a file eps_demo.eps demonstrating the capability of \ref
kpeter@2476: /// lemon::EpsDrawer "EpsDrawer".
alpar@1971: ///
alpar@1971: /// \include eps_demo.cc
alpar@1971:
alpar@1971: #include
alpar@1971: #include
alpar@1971:
alpar@1971: using namespace lemon;
alpar@1971:
alpar@1971: void kosar(EpsDrawer &ed)
alpar@1971: {
alpar@1971: double d,r;
alpar@1971:
alpar@1971: r = sqrt(2);
alpar@1971:
alpar@1971: ed.save();
alpar@1971:
alpar@1971: ed.translate(256,256).scale(256,256);
alpar@1971: ed.lineWidth(1/256);
alpar@1971:
alpar@1971: ed.collect();
alpar@1971:
alpar@1971: ed.moveTo(0,1);
alpar@1971:
alpar@1971: for(d=0;d