Go to the documentation of this file.00001 #ifndef bsvg_element_h_
00002 #define bsvg_element_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <bxml/bxml_document.h>
00021
00022 class bsvg_element : public bxml_element
00023 {
00024 public:
00025 bsvg_element(const vcl_string& name) : bxml_element(name) {}
00026
00027 void set_transformation(float trans_x, float trans_y, float rot_angle);
00028 void set_location(float trans_x, float trans_y);
00029
00030 void set_rotation(float rot_angle);
00031 void set_fill_color(const vcl_string& c);
00032
00033 void set_fill_color(unsigned red, unsigned green, unsigned blue);
00034 void set_stroke_color(const vcl_string& c);
00035
00036 void set_stroke_color(unsigned red, unsigned green, unsigned blue);
00037 void set_stroke_width(float w);
00038
00039 void set_fill_opacity(float o);
00040
00041 void set_stroke_opacity(float o);
00042 };
00043
00044 class bsvg_text : public bsvg_element
00045 {
00046 public:
00047 bsvg_text(const vcl_string& msg) : bsvg_element("text") { this->append_text(msg); }
00048 void set_font_size(int s);
00049 };
00050
00051
00052
00053
00054 class bsvg_group : public bsvg_element
00055 {
00056 public:
00057 bsvg_group() : bsvg_element("g") { this->append_text("\n"); }
00058 bool add_element(const bxml_data_sptr& element) { this->append_data(element); this->append_text("\n"); return true; }
00059 };
00060
00061 class bsvg_ellipse : public bsvg_element
00062 {
00063 public:
00064 bsvg_ellipse(float rx, float ry);
00065 };
00066
00067 class bsvg_rectangle : public bsvg_element
00068 {
00069 public:
00070 bsvg_rectangle(float x, float y, float width, float height);
00071 };
00072
00073 class bsvg_line : public bsvg_element
00074 {
00075 public:
00076 bsvg_line(float x1, float y1, float x2, float y2);
00077 };
00078
00079
00080 class bsvg_arrow_head : public bsvg_group
00081 {
00082 public:
00083 bsvg_arrow_head(float x, float y, float l);
00084 };
00085
00086 class bsvg_polyline : public bsvg_element
00087 {
00088 public:
00089 bsvg_polyline(const vcl_vector<float>& xs, const vcl_vector<float>& ys);
00090 };
00091
00092
00093
00094
00095
00096
00097 class bsvg_splice : public bsvg_group
00098 {
00099 public:
00100 bsvg_splice(float center_x, float center_y, float radius, float start_angle, float end_angle, bool long_arc = false);
00101 };
00102
00103 #endif // bsvg_element_h_