00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
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
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);
00065 void drawMiniFemaleIcon(std::ostringstream& os,double x,double y);
00066 void drawMiniCircle(std::ostringstream& os,double x,double y);
00067 void drawHeart(std::ostringstream& os,double x,double y);
00068 void drawSquiggle(std::ostringstream& os,double x,double y);
00069 void drawCurve(std::ostringstream& os, double x1, double y1, double x2, double y2);
00070
00071 };
00072
00073 #endif