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] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/sg/plotter_style (Version 11.3.0) and /externals/g4tools/include/tools/sg/plotter_style (Version 11.0.p2)


  1 // Copyright (C) 2010, Guy Barrand. All rights      1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
  2 // See the file tools.license for terms.            2 // See the file tools.license for terms.
  3                                                     3 
  4 #ifndef tools_sg_plotter_style                      4 #ifndef tools_sg_plotter_style
  5 #define tools_sg_plotter_style                      5 #define tools_sg_plotter_style
  6                                                     6 
  7 #include "../xml/styles"                            7 #include "../xml/styles"
  8                                                     8 
  9 #include "plotter"                                  9 #include "plotter"
 10                                                    10 
 11 namespace tools {                                  11 namespace tools {
 12 namespace sg {                                     12 namespace sg {
 13                                                    13 
 14 inline void style_from_res(const xml::styles&      14 inline void style_from_res(const xml::styles& a_styles,const std::string& a_path,axis& a_axis,bool a_verbose) {
 15  {typedef xml::styles::style_t style_t;            15  {typedef xml::styles::style_t style_t;
 16   const style_t* style = a_styles.find_style(a     16   const style_t* style = a_styles.find_style(a_path);
 17   if(style){                                       17   if(style){
 18     a_axis.set_from_style(a_styles.out(),*styl     18     a_axis.set_from_style(a_styles.out(),*style);
 19   } else {                                         19   } else {
 20     if(a_verbose) {                                20     if(a_verbose) {
 21       a_styles.out() << "tools::sg::style_from     21       a_styles.out() << "tools::sg::style_from_res(axis) :"
 22                      << " style " << sout(a_pa     22                      << " style " << sout(a_path) << " not found."
 23                      << std::endl;                 23                      << std::endl;
 24     }                                              24     }
 25   }}                                               25   }}
 26                                                    26 
 27   a_styles.res_sg_style<line_style>(a_path+".l     27   a_styles.res_sg_style<line_style>(a_path+".line_style",a_axis.line_style());
 28   a_styles.res_sg_style<line_style>(a_path+".t     28   a_styles.res_sg_style<line_style>(a_path+".ticks_style",a_axis.ticks_style());
 29   a_styles.res_sg_style<text_style>(a_path+".l     29   a_styles.res_sg_style<text_style>(a_path+".labels_style",a_axis.labels_style());
 30   a_styles.res_sg_style<text_style>(a_path+".m     30   a_styles.res_sg_style<text_style>(a_path+".mag_style",a_axis.mag_style());
 31   a_styles.res_sg_style<text_style>(a_path+".t     31   a_styles.res_sg_style<text_style>(a_path+".title_style",a_axis.title_style());
 32 }                                                  32 }
 33                                                    33 
 34 inline void style_from_res(const xml::styles&      34 inline void style_from_res(const xml::styles& a_styles,const std::string& a_path,plotter& a_plotter,bool a_verbose) {
 35   //sg::fields of plotter :                        35   //sg::fields of plotter :
 36  {typedef xml::styles::style_t style_t;            36  {typedef xml::styles::style_t style_t;
 37   const style_t* _style = a_styles.find_style(     37   const style_t* _style = a_styles.find_style(a_path);
 38   if(_style){                                      38   if(_style){
 39     a_plotter.set_from_style(a_styles.out(),*_     39     a_plotter.set_from_style(a_styles.out(),*_style);
 40   } else {                                         40   } else {
 41     if(a_verbose) {                                41     if(a_verbose) {
 42       a_styles.out() << "tools::sg::style_from     42       a_styles.out() << "tools::sg::style_from_res :"
 43                      << " style " << sout(a_pa     43                      << " style " << sout(a_path) << " not found."
 44                      << std::endl;                 44                      << std::endl;
 45     }                                              45     }
 46   }}                                               46   }}
 47                                                    47 
 48   //sg::fields of various xml::styles :            48   //sg::fields of various xml::styles :
 49   a_styles.res_sg_style<style>(a_path+".bins_s     49   a_styles.res_sg_style<style>(a_path+".bins_style.0",a_plotter.bins_style(0));
 50   a_styles.res_sg_style<style>(a_path+".errors     50   a_styles.res_sg_style<style>(a_path+".errors_style.0",a_plotter.errors_style(0));
 51   a_styles.res_sg_style<style>(a_path+".func_s     51   a_styles.res_sg_style<style>(a_path+".func_style.0",a_plotter.func_style(0));
 52   a_styles.res_sg_style<style>(a_path+".points     52   a_styles.res_sg_style<style>(a_path+".points_style.0",a_plotter.points_style(0));
 53                                                    53 
 54   a_styles.res_sg_style<style>(a_path+".backgr     54   a_styles.res_sg_style<style>(a_path+".background_style",a_plotter.background_style());
 55   a_styles.res_sg_style<text_style>(a_path+".t     55   a_styles.res_sg_style<text_style>(a_path+".title_style",a_plotter.title_style());
 56   a_styles.res_sg_style<text_style>(a_path+".i     56   a_styles.res_sg_style<text_style>(a_path+".infos_style",a_plotter.infos_style());
 57   a_styles.res_sg_style<text_style>(a_path+".t     57   a_styles.res_sg_style<text_style>(a_path+".title_box_style",a_plotter.title_box_style());
 58   a_styles.res_sg_style<style>(a_path+".inner_     58   a_styles.res_sg_style<style>(a_path+".inner_frame_style",a_plotter.inner_frame_style());
 59   a_styles.res_sg_style<style>(a_path+".grid_s     59   a_styles.res_sg_style<style>(a_path+".grid_style",a_plotter.grid_style());
 60   a_styles.res_sg_style<style>(a_path+".wall_s     60   a_styles.res_sg_style<style>(a_path+".wall_style",a_plotter.wall_style());
 61                                                    61 
 62   style_from_res(a_styles,a_path+".x_axis",a_p     62   style_from_res(a_styles,a_path+".x_axis",a_plotter.x_axis(),a_verbose);
 63   style_from_res(a_styles,a_path+".y_axis",a_p     63   style_from_res(a_styles,a_path+".y_axis",a_plotter.y_axis(),a_verbose);
 64   style_from_res(a_styles,a_path+".z_axis",a_p     64   style_from_res(a_styles,a_path+".z_axis",a_plotter.z_axis(),a_verbose);
 65   style_from_res(a_styles,a_path+".colormap_ax     65   style_from_res(a_styles,a_path+".colormap_axis",a_plotter.colormap_axis(),a_verbose);
 66                                                    66 
 67 }                                                  67 }
 68                                                    68 
 69 }}                                                 69 }}
 70                                                    70 
 71 #endif                                             71 #endif