Go to the documentation of this file.00001
00002
00003 #if !defined(SVG_H_INCLUDED)
00004 #define SVG_H_INCLUDED 1
00005
00006 #include <assert.h>
00007
00008 #include "Bounding_Box.hpp"
00009 #include "File.hpp"
00010 #include "Memory.hpp"
00011
00014
00015 class SVG {
00016 private:
00018 File stream;
00019
00021 double height;
00022
00024 double width;
00025
00027 String_Const units;
00028
00030 double x_offset;
00031
00033 double x_scale;
00034
00036 double y_offset;
00037
00039 double y_scale;
00040
00041 public:
00042 SVG(String_Const base_name,
00043 double width, double height, double x_scale, double y_scale,
00044 String_Const units);
00045
00046 ~SVG();
00047 void setOffsets(double x_offset, double y_offset);
00048
00049 void cartesian_scale(double x_width, double y_height, BoundingBox *bounding_box);
00050 void line(double x1, double y1, double x2, double y2, String_Const stroke);
00051 void rectangle(double x, double y,
00052 double width, double height, String_Const stroke_color,
00053 String_Const fill_color);
00054 void text(String_Const message, double x, double y, String_Const font_family,
00055 unsigned int font_size);
00056 };
00057
00058
00059
00060 #endif // !defined(SVG_H_INCLUDED)