Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50875 - in sandbox/SOC/2007/visualization/boost/svg_plot: . detail
From: pbristow_at_[hidden]
Date: 2009-01-29 12:25:12


Author: pbristow
Date: 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
New Revision: 50875
URL: http://svn.boost.org/trac/boost/changeset/50875

Log:
More doxygenation. All appear to have some documentation now. Free of warnings and builds examples OK. (But confusion about axis_line_style constructors - warning TODO
Text files modified:
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp | 8 ++
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp | 118 ++++++++++++++++++++++++---------------
   sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp | 54 +++++++++--------
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp | 26 +++++---
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp | 4 -
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp | 115 ++++++++++++++++++++++----------------
   6 files changed, 187 insertions(+), 138 deletions(-)

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -542,12 +542,14 @@
         // --------------------------------------------------------------------
 
         void draw_title()
- { /*! \fn draw_title \brief Draw title (for the whole plot).
- \details Update title_info_ with position.
+ { /*! \verbatim
+ Draw title (for the whole plot).
+ Update title_info_ with position.
             Assumes align = center_align.
             and center_align will ensure that will center correctly
             even if original string is made much longer because it contains Unicode like Ω
             because the render engine does the centering.
+ \endverbatim
           */
           derived().title_info_.x(derived().image.x_size() / 2.); // Center of image.
           double y;
@@ -1925,9 +1927,11 @@
           Derived& axis_plot_frame<Derived>::title(const std::string title)
           { //! Set a title for plot.
             /*! \details
+ \verbatim
               The string may include Unicode for greek letter and symbols.
               For example: my_plot.title("Plot of &#x3A9; function");
               includes a greek omega.
+ \endverbatim
             */
             // Plot title. TODO
             // new text parent code pushback

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -69,9 +69,12 @@
   struct t_path; // Draws a quadratic Bezier curve from the current point to (x,y).
   struct a_path; // Draws a elliptical arc from the current point to (x,y).
   struct P_path; // Adds another (absolute) point to a polyline or polygon.
- class g_element; // 'g' element is a container element, <g ... /> </g>
- // for grouping together related graphics elements, for example:
- // <g stroke="rgb(255,0,0)" <rect x="0" y="0" width="500" height="600"/> </g>
+ class g_element; /*! \verbatim
+ 'g' element is a container element, <g ... /> </g>
+ for grouping together related graphics elements, for example:
+ <g stroke="rgb(255,0,0)" <rect x="0" y="0" width="500" height="600"/> </g>
+ \endverbatim
+ */
 
   class svg_element
   { /*! \class boost::svg::svg_element
@@ -107,10 +110,12 @@
         s_out << " clip-path=\"url(#" << clip_name_ << ")\""; // Prefix with space.
       }
       /*! \details
+ \verbatim
         Classes inherited from svg_element add other references, 5.3.1, like color, fill, stroke, gradients...
         Example id: <g id="yMinorGrid" ></g>
         Example class: <g class="grid_style"></g>
         Example URI: fill="url(#Gradient01) // local URL
+ \endverbatim
       */
     } // void write_attributes(std::ostream& s_out)
 
@@ -246,7 +251,7 @@
 
     void write(std::ostream& rhs)
     { //! output line from (x1_, x2_) to (y1_, y2_)
- //! \details Example: <line x1="5" y1="185" x2="340" y2="185"/>
+ //! \details \verbatim Example: <line x1="5" y1="185" x2="340" y2="185"/> \endverbatim
       rhs << "<line x1=\"" << x1_ << "\" y1=\"" << y1_
           << "\" x2=\"" << x2_ << "\" y2=\"" << y2_ << "\"/>";
     }
@@ -307,8 +312,11 @@
     }
 
     void write(std::ostream& rhs)
- { //! Output SVG XML for rectangle.
- //! For example: <rect x="0" y="0" width="500" height="350"/>
+ { /*! \verbatim
+ Output SVG XML for rectangle.
+ For example: <rect x="0" y="0" width="500" height="350"/>
+ \endverbatim
+ */
       rhs << "<rect";
       write_attributes(rhs); // id (& clip_path)
       rhs << " x=\"" << x_ << "\""
@@ -377,8 +385,11 @@
     }
 
     void write(std::ostream& rhs)
- { //! Output SVG XML
- //! Example: <circle cx="9.78571" cy="185" r="5"/>
+ { /*! Output SVG XML
+ \verbatim
+ Example: <circle cx="9.78571" cy="185" r="5"/>
+ \endverbatim
+ */
       rhs << "<circle";
       write_attributes(rhs);
       rhs << " cx=\"" << x << "\" cy=\"" << y << "\" r=\"" << radius << "\"/>";
@@ -429,8 +440,12 @@
     }
 
     void write(std::ostream& rhs)
- { //! Output SVG XML for ellipse.
- //! Example: <ellipse rx="250" ry="100" fill="red" />
+ { /*!
+ \verbatim
+ Output SVG XML for ellipse.
+ Example: <ellipse rx="250" ry="100" fill="red" />
+ \endverbatim
+ */
       rhs << "<ellipse";
       write_attributes(rhs);
       rhs << " cx=\"" << cx << "\" cy=\"" << cy << "\""
@@ -756,6 +771,7 @@
 { /*! \class boost::svg::text_element
       \brief Holds text with position, size, font, (& styles) & orientation.
       \details
+ \verbatim
       Not necessarily shown correctly by all browsers, alas.
       SVG Coordinates of 1st character EM box, see
       http://www.w3.org/TR/SVG/text.html#TextElement 10.2
@@ -775,6 +791,7 @@
       std::string decoration; // // "underline" | "overline" | "line-through"
       Example:
       <text x="250" y="219.5" text-anchor="middle" font-family="verdana" font-size="12">0 </text>
+ \endverbatim
 
   */
  private: // Access only via member functions below.
@@ -1128,13 +1145,12 @@
     }
   }; // struct l_path
 
-
-
   struct h_path: public path_point
   { /*! \struct boost::svg::h_path
       \brief Draws a horizontal line from the current point (cpx, cpy) to (x, cpy).
        which becomes the new current point. No y needed, start from current point y.
     */
+ double x;
     void write(std::ostream& o_str)
     {
       if(relative)
@@ -1689,10 +1705,10 @@
     }
 
     void write(std::ostream& o_str)
- { /*! \brief Output SVG XML:
- \details Example: <polygon fill="lime" stroke="blue" stroke-width="10"
- points="850,75 958,137.5 958,262.5
- 850,325 742,262.6 742,137.5" />
+ { /*! \verbatim SVG XML:
+ Example: <polygon fill="lime" stroke="blue" stroke-width="10"
+ points="850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5" />
+ \endverbatim
        */
       o_str << "<polygon points=\"";
       for(ptr_vector<poly_path_point>::iterator i = poly_points.begin(); i != poly_points.end(); ++i)
@@ -1710,7 +1726,7 @@
     } // void write(std::ostream& o_str)
 
     std::ostream& operator<< (std::ostream& os)
- { /*! \brief Output polygon info. (May be useful for Boost.Test.
+ { /*! Output polygon info. (May be useful for Boost.Test.
          using os << "(" << p.x << ", " << p.y << ")" ;
          Usage: polygon_element p(1, 2, 3, 4, 5, 6);
            my_polygon.operator << (cout);
@@ -1727,11 +1743,11 @@
   }; // class polygon_element
 
   std::ostream& operator<< (std::ostream& os, polygon_element& p)
- { /*! \brief Output poly_path_ points (May be useful for Boost.Test).
- \details ptr_vector<poly_path_point> poly_points; All the x, y coordinate pairs,
- Usage: polygon_element p(1, 2, 3, 4, 5, 6);
- cout << p << endl;
- Outputs: (1, 2)(3, 4)(5, 6)
+ { /*! Output poly_path_ points (May be useful for Boost.Test).
+ ptr_vector<poly_path_point> poly_points; All the x, y coordinate pairs,
+ Usage: polygon_element p(1, 2, 3, 4, 5, 6);
+ cout << p << endl;
+ Outputs: (1, 2)(3, 4)(5, 6)
     */
     for(ptr_vector<poly_path_point>::iterator i = p.poly_points.begin(); i != p.poly_points.end(); ++i)
     {
@@ -1746,8 +1762,8 @@
      \brief The 'polyline' element: defines a set of connected straight line segments.
      \details
       http://www.w3.org/TR/SVG/shapes.html#PolylineElement
- 9.6 The 'polyline' element: defines a set of connected straight line segments.
- Typically, 'polyline' elements define open shapes.
+ 9.6 The polyline element: defines a set of connected straight line segments.
+ Typically, polyline elements define open shapes.
      A polyline is defined by including a 'path' element
      which contains a points="(path data)" attribute,
      where the points attribute contains the x, y coordinate pairs.
@@ -1804,8 +1820,10 @@
     }
 
     void write(std::ostream& o_str)
- { /*! \brief Output polyline info (useful for Boost.Test).
- \details Example: <polyline points=" 100,100 200,100 300,200 400,400"/>
+ { /*! \verbatim
+ Output polyline info (useful for Boost.Test).
+ Example: <polyline points=" 100,100 200,100 300,200 400,400"/>
+ \endverbatim
       */
       o_str << "<polyline points=\"";
       for(ptr_vector<poly_path_point>::iterator i = poly_points.begin(); i!= poly_points.end(); ++i)
@@ -1821,9 +1839,11 @@
   }; // class polyline_element
 
   std::ostream& operator<< (std::ostream& os, polyline_element& p)
- { /*! \brief Output polyline info (useful for Boost.Test).
- \details Example: <polyline points=" 100,100 200,100 300,200 400,400"/>
+ { /*! \verbatim
+ Output polyline info (useful for Boost.Test).
+ Example: <polyline points=" 100,100 200,100 300,200 400,400"/>
          ptr_vector<poly_path_point> poly_points; // All the x, y coordinate pairs.
+ \endverbatim
       */
     for(ptr_vector<poly_path_point>::iterator i = p.poly_points.begin(); i != p.poly_points.end(); ++i)
     {
@@ -1836,24 +1856,24 @@
     return os;
   } // std::ostream& operator<<
 
- /*! \class g_element
- \brief g_element (group element) is the node element of our document tree.
- 'g' element is a container element for grouping together
-
- \verbatim <g /> </g> \endverbatim.
-
-
- \details g_element ('g' element is a container element
- for grouping together related graphics elements).\n
- See http://www.w3.org/TR/SVG/struct.html#NewDocument 5.2.1 Overview.
-
- 'g' element is a container element for grouping together \verbatim <g /> </g> \endverbatim.
- related graphics elements, for example:
- \verbatim <g id="background" fill="rgb(255,255,255)"><rect width="500" height="350"/></g> \endverbatim
- */
 
   class g_element: public svg_element
- {
+ { /*! \class boost::svg::g_element
+ \brief g_element (group element) is the node element of our document tree.
+ \verbatim
+ 'g' element is a container element for grouping together <g /> ... </g>
+ \endverbatim.
+ \details g_element ('g' element is a container element
+ for grouping together related graphics elements).\n
+ See http://www.w3.org/TR/SVG/struct.html#NewDocument 5.2.1 Overview.
+
+ \verbatim
+ 'g' element is a container element for grouping together <g /> </g>
+ related graphics elements, for example:
+ <g id="background" fill="rgb(255,255,255)"><rect width="500" height="350"/></g>
+ \endverbatim.
+ */
+
   private:
     ptr_vector<svg_element> children; /*! Children of this group element node,
       containg graphics elements like text, circle line, polyline...
@@ -1878,13 +1898,19 @@
 
     void write(std::ostream& os)
     { /*! Output all children of a group element.
+ \verbatim
          Example:
          <g fill="rgb(255,255,255)" id="background"><rect x="0" y="0" width="500" height="350"/></g>
+ \endverbatim
       */
 
       if (children.size() > 0)
- { // Avoid useless output like: <g id="legendBackground"></g>
- // TODO check this doesn't mean that useful style is lost?
+ { /*!
+ \verbatim
+ Avoid useless output like: <g id="legendBackground"></g>
+ TODO check this doesn't mean that useful style is lost?
+ \endverbatim
+ */
 
         os << "<g"; // Do NOT need space if convention is to start following item with space.
         write_attributes(os); // id="background" (or clip_path)

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -141,7 +141,7 @@
 // eliminate extraneous white space and separators.
 // Use symbols if the same graphic appears multiple times in the document.
 // Use CSS property inheritance and selectors to consolidate commonly used properties into named styles
-// or to assign the properties to a parent <g> element.
+// or to assign the properties to a parent group element.
 // Use filter effects to help construct graphics via client-side graphics operations.
 
 namespace boost
@@ -155,12 +155,13 @@
   //! \namespace boost::svg::boxplot \brief SVG classes and functions specific to boxplots.
   //! \namespace boost::svg::detail \brief SVG classes and functions implementation details (not recommended for normal use).
 
- // Inserted as a SVG comment, for example
- // "<!-- Demo of 1D plot features. --> \n"
- // and also as a \verbatim <desc /> \endverbatim
- // http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements
- // 5.4 The 'desc' and 'title' elements
-
+ /*! Inserted as a SVG comment, for example
+ "<!-- Demo of 1D plot features. --> \n"
+ and also as a \verbatim <desc />
+ http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements
+ 5.4 The 'desc' and 'title' elements
+ \endverbatim
+ */
     static const std::string package_info = //!< Default SVG package information about this program that produced the SVG image (not the image itself).
       "<!-- SVG plot written using Boost.Plot program (Creator Jacob Voytko) --> \n"
       "<!-- Use, modification and distribution of Boost.Plot subject to the --> \n"
@@ -168,12 +169,15 @@
       "<!-- (See accompanying file LICENSE_1_0.txt --> \n"
       "<!-- or copy at http://www.boost.org/LICENSE_1_0.txt) --> \n";
 
- // Copyright notice to be inserted into plot image produced by this program.
- // Note: can have more than one copyright date, or a range.
- // produces a copyright notice as an SVG comment like this:
- // "<!-- Copyright Paul A. Bristow, 2007 --> \n"
- // and as a meta item:
- // <meta name="copyright" content="Paul A. Bristow" />
+ /* \verbatim
+ Copyright notice to be inserted into plot image produced by this program.
+ Note: can have more than one copyright date, or a range.
+ produces a copyright notice as an SVG comment like this:
+ "<!-- Copyright Paul A. Bristow, 2007 --> \n"
+ and as a meta item:
+ <meta name="copyright" content="Paul A. Bristow" />
+ \endverbatim
+ */
 
 //! Class to output Scalable Vector Graph XML graph elements: point, path, line, circle, rect, polygon and text.
   // and handle plot stylesheets.
@@ -624,62 +628,62 @@
   }
 
   void description(const std::string d)
- { //! Write description to the document (for header as <desc>).
+ { //! \verbatim Write description to the document (for header as <desc>). \endverbatim
     image_desc_ = d;
   }
 
   const std::string& description()
- { //! Get description of the document (for header as <desc>).
+ { //! \verbatim Get description of the document (for header as <desc>).\endverbatim
     return image_desc_;
   }
 
   void author(const std::string a)
- { //! Set author for the document (default is copyright_holder).
+ { //! \verbatim Set author for the document (default is copyright_holder).\endverbatim
     author_ = a;
   }
 
   const std::string& author()
- { //! Get author of the document (for header as <author>).
+ { //! \verbatim Get author of the document (for header as <author>).\endverbatim
     return author_;
   }
 
   void document_title(const std::string d)
- { //! Set document title for the document (for header as <title>)..
+ { //! \verbatim Set document title for the document (for header as <title>). \endverbatim
     title_document_ = d;
   }
 
   const std::string document_title()
- { //! Get document title for the document (for header as <title>)..
+ { //! \verbatim Get document title for the document (for header as <title>). \endverbatim
     return title_document_;
   }
 
   void copyright_holder(const std::string d)
- { //! Set document title for the document (for header as <copyright_holder>)..
+ { //! \verbatim Set document title for the document (for header as <copyright_holder>). \endverbatim
     holder_copyright_ = d;
   }
 
   const std::string copyright_holder()
- { //! Get document title for the document (for header as <copyright_holder>)..
+ { //! \verbatim Get document title for the document (for header as <copyright_holder>). \endverbatim
     return holder_copyright_;
   }
 
   void copyright_date(const std::string d)
- { //! Set document title for the document (for header as <copyright_date>)..
+ { //! \verbatim Set document title for the document (for header as <copyright_date>). \endverbatim
     date_copyright_ = d;
   }
 
   const std::string copyright_date()
- { //! Get document title for the document (for header as <copyright_date>)..
+ { //! \verbatim Get document title for the document (for header as <copyright_date>). \endverbatim
     return date_copyright_;
   }
 
   void image_filename(const std::string filename)
- { //! Set image filename for the document (for header as <filename>)..
+ { //! \verbatim Set image filename for the document (for header as <filename>). \endverbatim
     filename_ = filename;
   }
 
   const std::string image_filename()
- { //! Get image filename for the document (for header as <filename>)..
+ { //! \verbatim Get image filename for the document (for header as <filename>). \endverbatim
     return filename_;
   }
 

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -361,7 +361,7 @@
   {
     max_whisker_style_.stroke_width(width);
     return *this; // \return reference to svg_boxplot_series to make chainable.
- }
+ }
 
   double svg_boxplot_series::max_whisker_width()
   { // width of the box, not the margin.
@@ -620,7 +620,7 @@
     \brief A plot that can display boxplots of several data series.
     \details Holds all data about the plot (but not any data series - see svg_boxplot_series)
     axis_plot_frame.hpp contains functions common to 1 and 2-D, and boxplot.
-*/
+ */
   friend svg_boxplot_series;
   friend class detail::axis_plot_frame<svg_boxplot>;
   // axis_plot_frame.hpp contains functions common to 1 and 2-D, and boxplot.
@@ -1151,10 +1151,13 @@
   void draw_title()
   { // Update title_info_ with position.
     title_info_.x(image.x_size() / 2.); // Center of image.
- // Assumes align = center_align.
- // Note: center_align will ensure that will center correctly
- // even if original string is long because contains Unicode like &#x3A9;
- // because the browser render engine does the centering.
+ /*! \verbatim
+ Assumes align = center_align.
+ Note: center_align will ensure that will center correctly
+ even if original string is long because contains Unicode like
+ because the browser render engine does the centering.
+ \endverbatim
+ */
     double y = title_info_.style().font_size() * text_margin_; // Leave a linespace above.
     title_info_.y(y); // Vertical position.
     image.g(boxplot::PLOT_TITLE).push_back(new text_element(title_info_));
@@ -2213,12 +2216,13 @@
   }
 
   svg_boxplot& svg_boxplot::x_axis_position(int pos)
- { // Position of the horizontal X-axis line (on the border).
+ { /*! Position of the horizontal X-axis line (on the border).
+ But controlled by the intersection with Y-axis,
+ so this only changes the default position from bottom to top,
+ but will be changed if X-axis intersects the Y-axis
+ (that is if Y-axis includes zero).
+ */
      x_axis_position_ = pos; // top or bottom
- // But controlled by the intersection with Y-axis,
- // so this only changes the default position from bottom to top,
- // but will be changed if X-axis intersects the Y-axis
- // (that is if Y-axis includes zero).
     return *this; // \return reference to svg_boxplot to make chainable.
   }
 

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -125,10 +125,6 @@
 void id(const std::string& id);
 std::string id( );
 void clip_id(const std::string& id);
-class rect_element;
-class circle_element;
-class ellipse_element;
-class line_element;
 enum align_style; // left_align, right_align, center_align
 enum rotate_style; // Rotation in degrees from horizontal.
 // horizontal = 0, // normal left to right.

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp 2009-01-29 12:25:10 EST (Thu, 29 Jan 2009)
@@ -67,26 +67,28 @@
 double string_svg_length(const std::string& s, const text_style& style);
 // Estimate length of string when appears as svg units.
 
-// -----------------------------------------------------------------
-// This is the style information for any <g> tag.
-// This may be expanded to include more data from the SVG standard.
-// -----------------------------------------------------------------
-
-// There are some strange effects for text on some browsers
-// (Firefox especially) when only stroke is specified.
-// fill is interpreted as black, and the font outline is fuzzy and bolder.
-// <g id="title" stroke="rgb(255,0,0)"> .. is red border and black fill.
-// (because created as a graphic not a builtin font?)
-// <g id="title" fill="rgb(255,0,0)"> .. is red sharp font.
-// <g id="title" stroke="rgb(255,0,0)" fill="rgb(255,0,0)"> red and red fill also fuzzy.
-// So for text, only specific the fill unless a different outline is really wanted.
-// Defaults for text provide a built-in glyph, for example for title:
-// <g id="title">
-// <text x="250" y="36" text-anchor="middle" font-size="18" font-family="Verdana">
-// Plot of data
-// </text>
-// </g>
-// and this is not a graphic.
+/*
+\verbatim
+ This is the style information for any group (g) tag.
+ This may be expanded to include more data from the SVG standard.
+
+ There are some strange effects for text on some browsers
+ (Firefox especially) when only stroke is specified.
+ fill is interpreted as black, and the font outline is fuzzy and bolder.
+ <g id="title" stroke="rgb(255,0,0)"> .. is red border and black fill.
+ (because created as a graphic not a builtin font?)
+ <g id="title" fill="rgb(255,0,0)"> .. is red sharp font.
+ <g id="title" stroke="rgb(255,0,0)" fill="rgb(255,0,0)"> red and red fill also fuzzy.
+ So for text, only specific the fill unless a different outline is really wanted.
+ Defaults for text provide a built-in glyph, for example for title:
+ <g id="title">
+ <text x="250" y="36" text-anchor="middle" font-size="18" font-family="Verdana">
+ Plot of data
+ </text>
+ </g>
+ and this is not a graphic.
+ \endverbatim
+*/
 
 class svg_style
 { //! \class boost::svg::svg_style Holds the basic SVG stroke, fill colors and width, and their switches.
@@ -375,13 +377,15 @@
 
   text_style& text_style::font_family(const std::string& s)
   { //! Set font family, for example: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode".
- /*! \details Default for browser is sans with Firefox & IE but serif with Opera.\n
+ /*! \verbatim
+ \details Default for browser is sans with Firefox & IE but serif with Opera.\n
     See also browser conformance test at\n
       http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-01-t.svg\n
       which tests three styles of font, serif, sans-serif and mono-spaced.\n
       <text font-family="Georgia, 'Minion Web', 'Times New Roman', Times, 'MS PMincho', Heisei-Mincho, serif " x="20" y="80">A serifed face</text>\n
       <text font-family="Arial, 'Arial Unicode', 'Myriad Web', Geneva, 'Lucida Sans Unicode', 'MS PGothic', Osaka, sans-serif " x="20" y="160">A sans-serif face</text>\n
       <text font-family="'Lucida Console', 'Courier New', Courier, Monaco, 'MS Gothic', Osaka-Mono, monospace" x="20" y="240">A mono (iW) face</text>
+ \endverbatim
     */
     font_family_ = s;
     return *this; //! \return reference to text_style to make chainable.
@@ -594,13 +598,16 @@
   asterisk, //!< Asterix as * symbol
   x, //!< letter x
   cross, //!< cross
- symbol //!< Unicode symbol including letters, digits, greek & 'squiggles'.
- //! Default letter "X".\n
- //! Other examples: "&#x3A9;"= greek omega, "&#x2721;" = Star of David hexagram
- //! &#2720 Maltese cross & other dingbats. \n
- //! See also http://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin geometric shapes
- //! that may be a better way to make these symbols: &#25A0 black square ...to &#25FF
- //! But unclear how many browsers implement these properly.
+ symbol /*!< Unicode symbol including letters, digits, greek & 'squiggles'.
+ \verbatim
+ Default letter "X".\n
+ Other examples: "&#x3A9;"= greek omega, "&#x2721;" = Star of David hexagram
+ &#2720 Maltese cross & other dingbats. \n
+ See also http://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin geometric shapes
+ that may be a better way to make these symbols: &#25A0 black square ...to &#25FF
+ But unclear how many browsers implement these properly.
+ \endverbatim
+ */
 }; // enum point_shape
 
 class plot_point_style
@@ -906,6 +913,7 @@
     const svg_color col = black,
     double width = 1,
     int axis_position = 0,
+ double axis = -1,
     bool label_on = true,
     bool label_units_on = false,
     bool axis_lines_on = true);
@@ -927,17 +935,19 @@
 
 // class axis_line_style Member Functions Definitions:
 
- axis_line_style::axis_line_style( //! \class axis_line_style Default constructor, sets all member data items.
- dim d,
- double min,
- double max, // Defaults.
+ axis_line_style::axis_line_style( // Default constructor. Sets all member data items with defaults for all.
+ dim d, //!< Dimension (zero if boxplot)
+ double min, //! Minimum of axis line.
+ double max, //! Maximum of axis line.
     // See also default in ticks_labels_style.
- const svg_color col,
- double width,
- int axis_position,
- int axis_,
- bool label_on,
- bool label_units_on,
+ const svg_color col, //!< Line color
+ double width, //!< Line width.
+ int axis_position, //!< Intersection of axis, if any.
+ double axis_, // // double axis_, not referenced - but there is confusion about order of parameter in different constructors.
+ // TODO find where used and resolve.
+
+ bool label_on,//!< If to include axis label (default true).
+ bool label_units_on, //!< If to include units after axis label (default true).
     bool axis_lines_on)
     :
     dim_(d), min_(min), max_(max), color_(col), axis_width_(width),
@@ -1009,10 +1019,10 @@
 
   double axis_line_style::position()
   { //! \returns How the axes intersect.\n
- //! enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
- //! enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
- //! If axes look like an L, then is bottom left.
- //! If a T then y intersects and X is at bottom.
+ //! enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
+ //! enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
+ //! If axes look like an L, then is bottom left.
+ //! If a T then y intersects and X is at bottom.
     return axis_position_;
   }
 
@@ -1563,24 +1573,29 @@
   */
 
 double string_svg_length(const std::string& s, const text_style& style)
-{ //! \return length of string in SVG units depending on text_style (font size etc).
- // If possible use an actual length, but probably platform and/or browser-dependent,
- // else use average char width,
- // and deal with Unicode, for example &#x3A9; = greek omega,
- // counting each symbol(s) embedded between & amd ; as one character,
- // and ignore embedded xml like <sub> (not implemented by browsers yet).
+{
+ /*
+ \verbatim
+ If possible use an actual length, but probably platform and/or browser-dependent,
+ else use average char width,
+ and deal with Unicode, for example &#x3A9; = greek omega,
+ counting each symbol(s) embedded between & amd ; as one character,
+ and ignore embedded xml like <sub> (not implemented by browsers yet).
+ \endverbatim
+ \return length of string in SVG units depending on text_style (font size etc).
+ */
 
  double d = 0.; // Estimated or actual width of resulting svg string.
  bool in_esc = false;
  for (std::string::const_iterator i = s.begin(); i != s.end(); i++)
  {
     if (*i == '&')
- { // Start of Unicode 'escape sequence' &#x3A9;
+ { // Start of Unicode 'escape sequence'
       in_esc = true;
        while ((*i != ';')
          && (i != s.end())) // In case mistakenly not terminated.
        {
- i++; // Only count &#x3A9; as 1 character wide.
+ i++; // Only count Unicode string as 1 character wide.
        }
        in_esc = false;
     }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk