Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2008-01-30 04:32:38


Author: pbristow
Date: 2008-01-30 04:32:37 EST (Wed, 30 Jan 2008)
New Revision: 43019
URL: http://svn.boost.org/trac/boost/changeset/43019

Log:
Correction to some functions, including legend_border_color. Others may still not work.
Text files modified:
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp | 3 +++
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp | 2 +-
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp | 3 ++-
   3 files changed, 6 insertions(+), 2 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 2008-01-30 04:32:37 EST (Wed, 30 Jan 2008)
@@ -2038,12 +2038,14 @@
 
           Derived& background_color(const svg_color& col)
           { //
+ derived().legend_box_.fill(col);
             derived().image.g(PLOT_BACKGROUND).style().fill_color(col);
             return derived();
           }
 
           Derived& legend_background_color(const svg_color& col)
           {
+ derived().legend_box_.fill(col);
             derived().image.g(PLOT_LEGEND_BACKGROUND).style().fill_color(col);
             return derived();
           }
@@ -2055,6 +2057,7 @@
 
           Derived& legend_border_color(const svg_color& col)
           {
+ derived().legend_box_.stroke(col);
             derived().image.g(PLOT_LEGEND_BACKGROUND).style().stroke_color(col);
             return derived();
           }

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp 2008-01-30 04:32:37 EST (Wed, 30 Jan 2008)
@@ -275,7 +275,7 @@
         text_margin_(2.), // for axis label text, as a multiplier of the font size.
         image_border_(yellow, white, 2, 10, true, true), // margin should be about axis label font size.
         plot_window_border_(red, svg_color(255, 255, 255), 2, 3, true, false),
- legend_box_(yellow, azure, 2, 4, true, true),
+ legend_box_(yellow, azure, 1, 2, true, true),
         legend_header_(0, 0, "", legend_style_, center_align, horizontal),
         legend_width_(200), // width of legend box (pixels) // TODO isn't this calculated?
         legend_height_(0), // height of legend box (pixels)

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 2008-01-30 04:32:37 EST (Wed, 30 Jan 2008)
@@ -1065,7 +1065,8 @@
 
 double string_svg_length(const std::string& s, const text_style& style)
 { // Return length of string in SVG units depending on font size etc.
- // If possible use an actual length, else use average char width,
+ // If possible use an actual length, but probably platform and/or browser-dependent,
+ // else use average char width,
   // and deal with Unicode, for example Ω = greek omega,
   // counting each symbol(s) embedded between & amd ; as one character,
   // and ignore embedded xml like <sub> (not implemented by browsers yet).


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