Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

SVG.h

Go to the documentation of this file.
00001 
00002 //
00003 // This file is part of the MADELINE 2 program 
00004 // written by Edward H. Trager and Ritu Khanna
00005 // Copyright (c) 2005 by the
00006 // Regents of the University of Michigan.
00007 // All Rights Reserved.
00008 // 
00009 // The latest version of this program is available from:
00010 // 
00011 //   http://eyegene.ophthy.med.umich.edu/madeline/
00012 //   
00013 // Released under the GNU General Public License.
00014 // A copy of the GPL is included in the distribution
00015 // package of this software, or see:
00016 // 
00017 //   http://www.gnu.org/copyleft/
00018 //   
00019 // ... for licensing details.
00020 // 
00022 
00023 #ifndef SVG_INCLUDED
00024 #define SVG_INCLUDED
00025 
00026 #define _USE_MATH_DEFINES
00027 
00028 #include "DrawingMetrics.h"
00029 #include <cmath>
00030 #include <sstream>
00031 
00032 class SVG{
00033         
00034 private:
00035         
00036 public:
00037         SVG() {}
00038         
00039         // Drawing Methods:
00040         void startGroup(std::ostringstream& os,const std::string& cssClass=std::string(""),const std::string& id=std::string(""));
00041         void endGroup(std::ostringstream& os);
00042         void drawTitle(std::ostringstream& os,const std::string title){
00043                 os << title;
00044         }
00045         void drawLine(std::ostringstream& os,double x1,double y1,double x2,double y2,const std::string& cssClass=std::string(""),const std::string& id=std::string(""));
00046         void drawHorizontalLine(std::ostringstream& os,double y,double x1,double x2,const std::string& cssClass=std::string(""),const std::string& id=std::string(""));
00047         void drawVerticalLine(std::ostringstream& os,double x,double y1,double y2,const std::string & cssClass=std::string(""), const std::string & id=std::string(""));
00048         void drawPolyline(std::ostringstream& os,const std::string points,const std::string& cssClass=std::string(""),const std::string& id=std::string(""));
00049         void drawText(std::ostringstream& os,double x,double y,std::string text,const std::string&  cssClass=std::string(""),const std::string& id=std::string(""));
00050         void drawRectangle(std::ostringstream& os,double x,double y,double width,double height,const std::string& cssClass=std::string(""),const std::string& id=std::string(""),const std::string& style=std::string(""));
00051         
00052         //
00053         // Low level methods for drawing individuals:
00054         //
00055         void drawMaleIcon(std::ostringstream& os,double x, double y, const std::string &id = std::string(""), const std::string &cssClass = std::string(""));
00056         void drawFemaleIcon(std::ostringstream& os,double x, double y, const std::string &id = std::string(""), const std::string &cssClass = std::string(""));
00057         void drawGenderUnknownIcon(std::ostringstream& os,double x, double y, const std::string &id = std::string(""), const std::string &cssClass = std::string(""));
00058         void drawIconForNoChildren(std::ostringstream& os,double x, double y);
00059         void drawIconForInfertility(std::ostringstream& os,double x, double y);
00060         void drawIconForAbortedPregnancy(std::ostringstream& os,double x, double y, const std::string &id = std::string(""), const std::string &cssClass = std::string(""));
00061         
00062         void drawAdoptedIn(std::ostringstream& os,double x,double y,bool widerMargin=false);
00063         void drawAdoptedOut(std::ostringstream& os,double x,double y,bool widerMargin=false);
00064         void drawMiniMaleIcon(std::ostringstream& os,double x,double y);   // Only used for aborted/terminated pregnancies.
00065         void drawMiniFemaleIcon(std::ostringstream& os,double x,double y); // Only used for aborted/terminated pregnancies.
00066         void drawMiniCircle(std::ostringstream& os,double x,double y); // Used to show carrier status
00067         void drawHeart(std::ostringstream& os,double x,double y); 
00068         void drawSquiggle(std::ostringstream& os,double x,double y); // Used for RelationshipEnded ...
00069         void drawCurve(std::ostringstream& os, double x1, double y1, double x2, double y2);
00070          
00071 };
00072 
00073 #endif

Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4