Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > eebc325dc36bd6e3b09b9b45133e42f8 > files > 930

HippoDraw-devel-docs-1.21.1-10.fc13.i686.rpm

<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>HippoDraw Class Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="hippoApp.ico">
</head><body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_6dcc65b7c74f97460af44109581e51d3.html">reps</a>
  </div>
</div>
<div class="contents">
<h1>ErrorBarRep.cxx</h1><a href="ErrorBarRep_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="comment">// include max() and min() missing from MicroSoft Visual C++</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;msdevstudio/MSconfig.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif //_MSC_VER</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="ErrorBarRep_8h.html" title="hippodraw::ErrorBarRep class interface">ErrorBarRep.h</a>&quot;</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="DataPointTuple_8h.html" title="hippodraw::DataPointTuple namespace interface">datasrcs/DataPointTuple.h</a>&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="DataSource_8h.html" title="hippodraw::DataSource class interface.">datasrcs/DataSource.h</a>&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="ViewBase_8h.html" title="hippodraw::ViewBase class interface">graphics/ViewBase.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="BinaryTransform_8h.html" title="hippodraw::BinaryTransform class interface">transforms/BinaryTransform.h</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;cassert&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">using</span> std::string;
<a name="l00027"></a>00027 <span class="keyword">using</span> std::vector;
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">using namespace </span>hippodraw;
<a name="l00030"></a>00030 
<a name="l00031"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#ad09a39ca90975bc36c760aeaa77b0120">00031</a> ErrorBarRep::ErrorBarRep ( )
<a name="l00032"></a>00032   : <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> ( <span class="stringliteral">&quot;ErrorBar&quot;</span>, 0 ),
<a name="l00033"></a>00033     m_x_flag ( false ),
<a name="l00034"></a>00034     m_y_flag ( false )
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 }
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#a10c7fa876232a0cfa96c80ec3095b6df">00038</a> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a10c7fa876232a0cfa96c80ec3095b6df" title="The destructor.">ErrorBarRep::~ErrorBarRep</a>()
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040 }
<a name="l00041"></a>00041 
<a name="l00042"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#ab2b96fa7b2189b29a67f432912d081c2">00042</a> <a class="code" href="classhippodraw_1_1RepBase.html" title="The base class for the point representation hierarchy.">RepBase</a> * <a class="code" href="classhippodraw_1_1ErrorBarRep.html#ab2b96fa7b2189b29a67f432912d081c2" title="The clone function returns an object of its own kind which is a copy of this object...">ErrorBarRep::clone</a>()
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#ad09a39ca90975bc36c760aeaa77b0120" title="The default constructor.">ErrorBarRep</a>( *<span class="keyword">this</span> );
<a name="l00045"></a>00045 }
<a name="l00046"></a>00046 
<a name="l00047"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#af342de43ceb2bc31f5c2b75d9486bd59">00047</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#af342de43ceb2bc31f5c2b75d9486bd59" title="Sets the flag to plot the errors on the X axis.">ErrorBarRep::setXError</a> ( <span class="keywordtype">bool</span> flag )
<a name="l00048"></a>00048 {
<a name="l00049"></a>00049   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abef5690fcbd119e1d21e1c3fb029b710" title="The X error flag.">m_x_flag</a> = flag;
<a name="l00050"></a>00050 }
<a name="l00051"></a>00051 
<a name="l00052"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#a3579885a476d4c4000043c9777403b6b">00052</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a3579885a476d4c4000043c9777403b6b" title="Sets the flag to plot the errors on the Y axis.">ErrorBarRep::setYError</a> ( <span class="keywordtype">bool</span> flag )
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a4ccd42bda77a1b13b995ac3ccf9d662f" title="The Y error flag.">m_y_flag</a> = flag;
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="keywordtype">void</span>
<a name="l00058"></a>00058 <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a91af204016a4b344bb6a9e298d4465f6" title="Creates the line segment for the X error bar.">ErrorBarRep::</a>
<a name="l00059"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#a91af204016a4b344bb6a9e298d4465f6">00059</a> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a91af204016a4b344bb6a9e298d4465f6" title="Creates the line segment for the X error bar.">drawXError</a> ( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> error,
<a name="l00060"></a>00060              <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> &amp; tb )
<a name="l00061"></a>00061 {
<a name="l00062"></a>00062   <span class="keywordflow">try</span> {
<a name="l00063"></a>00063     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> &amp; t 
<a name="l00064"></a>00064       = dynamic_cast &lt; <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> &amp; &gt; ( tb );
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     <span class="keywordtype">double</span> bull;
<a name="l00067"></a>00067 
<a name="l00068"></a>00068     <span class="keywordtype">double</span> thi = <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a47a24e0919ab61b0776d358f254fe1ec" title="The Y axis range for cap calculation.">m_y_range</a>.<a class="code" href="classhippodraw_1_1Range.html#a10f7231db7f0fe0855fc344e98575714" title="Returns the maximum of the range object.">high</a>();
<a name="l00069"></a>00069     <span class="keywordtype">double</span> tlo = <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a47a24e0919ab61b0776d358f254fe1ec" title="The Y axis range for cap calculation.">m_y_range</a>.<a class="code" href="classhippodraw_1_1Range.html#a3865c37c86de4e4eafc43b6b40ef05b9" title="Returns the minimum of the range object.">low</a>();
<a name="l00070"></a>00070     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( bull, thi );
<a name="l00071"></a>00071     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( bull, tlo );
<a name="l00072"></a>00072 
<a name="l00073"></a>00073     <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> new_range( tlo, thi );
<a name="l00074"></a>00074     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a47a24e0919ab61b0776d358f254fe1ec" title="The Y axis range for cap calculation.">m_y_range</a> = new_range;
<a name="l00075"></a>00075 
<a name="l00076"></a>00076     <span class="keywordtype">double</span> xhi = x + error;
<a name="l00077"></a>00077     <span class="keywordtype">double</span> xlo = x - error;
<a name="l00078"></a>00078 
<a name="l00079"></a>00079     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( x, y );
<a name="l00080"></a>00080     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( xlo, bull );
<a name="l00081"></a>00081     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( xhi, bull );
<a name="l00082"></a>00082 
<a name="l00083"></a>00083     <span class="comment">// The line.</span>
<a name="l00084"></a>00084     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.push_back ( xhi );
<a name="l00085"></a>00085     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.push_back ( y );
<a name="l00086"></a>00086     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.push_back ( xlo );
<a name="l00087"></a>00087     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.push_back ( y );
<a name="l00088"></a>00088 
<a name="l00089"></a>00089   }
<a name="l00090"></a>00090   <span class="keywordflow">catch</span> ( ... ) {
<a name="l00091"></a>00091     assert ( <span class="keyword">false</span> );
<a name="l00092"></a>00092   }
<a name="l00093"></a>00093 }
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 <span class="keywordtype">void</span>
<a name="l00096"></a>00096 <a class="code" href="classhippodraw_1_1ErrorBarRep.html#af040c87e408fb65f225b1084d1ed64d8" title="Creates the line segment for the Y error bar.">ErrorBarRep::</a>
<a name="l00097"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#af040c87e408fb65f225b1084d1ed64d8">00097</a> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#af040c87e408fb65f225b1084d1ed64d8" title="Creates the line segment for the Y error bar.">drawYError</a> ( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> error,
<a name="l00098"></a>00098              <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> &amp; tb )
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100   <span class="keywordflow">try</span> {
<a name="l00101"></a>00101     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> &amp; t 
<a name="l00102"></a>00102       = dynamic_cast &lt; <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinaryTransform.html" title="A transform that transforms coordinates from one 2D coordinate system to another...">BinaryTransform</a> &amp; &gt; ( tb );
<a name="l00103"></a>00103 
<a name="l00104"></a>00104     <span class="keywordtype">double</span> bull = 0.0;
<a name="l00105"></a>00105 
<a name="l00106"></a>00106     <span class="keywordtype">double</span> thi = <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abedd9e4d36b29623422f6834c95d0fcd" title="The X axis range for cap calculation.">m_x_range</a>.<a class="code" href="classhippodraw_1_1Range.html#a10f7231db7f0fe0855fc344e98575714" title="Returns the maximum of the range object.">high</a>();
<a name="l00107"></a>00107     <span class="keywordtype">double</span> tlo = <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abedd9e4d36b29623422f6834c95d0fcd" title="The X axis range for cap calculation.">m_x_range</a>.<a class="code" href="classhippodraw_1_1Range.html#a3865c37c86de4e4eafc43b6b40ef05b9" title="Returns the minimum of the range object.">low</a>();
<a name="l00108"></a>00108     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( thi, bull );
<a name="l00109"></a>00109     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( tlo, bull );
<a name="l00110"></a>00110 
<a name="l00111"></a>00111     <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> new_range( tlo, thi );
<a name="l00112"></a>00112     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abedd9e4d36b29623422f6834c95d0fcd" title="The X axis range for cap calculation.">m_x_range</a> = new_range;
<a name="l00113"></a>00113 
<a name="l00114"></a>00114     <span class="keywordtype">double</span> yhi = y + error; <span class="comment">//0.5 * error;</span>
<a name="l00115"></a>00115     <span class="keywordtype">double</span> ylo = y - error; <span class="comment">//0.5 * error;</span>
<a name="l00116"></a>00116 
<a name="l00117"></a>00117     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( x, y );
<a name="l00118"></a>00118     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( bull, ylo );
<a name="l00119"></a>00119     t.<a class="code" href="classhippodraw_1_1BinaryTransform.html#a1b4dd77a3812e7bf43a74d52ad80ad0b" title="Transform the coordinates on the X and Y axes.">transform</a>( bull, yhi );
<a name="l00120"></a>00120 
<a name="l00121"></a>00121     <span class="comment">// The line.</span>
<a name="l00122"></a>00122     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.push_back ( x );
<a name="l00123"></a>00123     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.push_back ( yhi );
<a name="l00124"></a>00124     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.push_back ( x );
<a name="l00125"></a>00125     <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.push_back ( ylo );
<a name="l00126"></a>00126 
<a name="l00127"></a>00127   }
<a name="l00128"></a>00128   <span class="keywordflow">catch</span> ( ... ) {
<a name="l00129"></a>00129     assert ( <span class="keyword">false</span> );
<a name="l00130"></a>00130   }
<a name="l00131"></a>00131 }
<a name="l00132"></a>00132 <span class="keyword">namespace </span>dp = hippodraw::DataPoint2DTuple;
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <span class="keywordtype">void</span>
<a name="l00135"></a>00135 <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a1883a3da03fb3b72260482c91db6cd47" title="Draws the projected values.">ErrorBarRep::</a>
<a name="l00136"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#a1883a3da03fb3b72260482c91db6cd47">00136</a> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a1883a3da03fb3b72260482c91db6cd47" title="Draws the projected values.">drawProjectedValues</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ntuple,
<a name="l00137"></a>00137                       <a class="code" href="classhippodraw_1_1TransformBase.html" title="A transform that transforms coordinates from one coordinate system to another.">TransformBase</a> * transform,
<a name="l00138"></a>00138                       <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view )
<a name="l00139"></a>00139 {
<a name="l00140"></a>00140   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abef5690fcbd119e1d21e1c3fb029b710" title="The X error flag.">m_x_flag</a> == <span class="keyword">false</span> &amp;&amp;
<a name="l00141"></a>00141        <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a4ccd42bda77a1b13b995ac3ccf9d662f" title="The Y error flag.">m_y_flag</a> == <span class="keyword">false</span> ) <span class="keywordflow">return</span>;
<a name="l00142"></a>00142 
<a name="l00143"></a>00143   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classhippodraw_1_1RepBase.html#ae039d328384bad1eacf85c8fc593939d" title="Returns the size of the representation.">size</a> = ntuple -&gt; rows ();
<a name="l00144"></a>00144   <span class="keywordflow">if</span> ( size == 0 ) <span class="keywordflow">return</span>;
<a name="l00145"></a>00145 
<a name="l00146"></a>00146   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.clear ();
<a name="l00147"></a>00147   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.clear ();
<a name="l00148"></a>00148 
<a name="l00149"></a>00149   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> new_size = 0;
<a name="l00150"></a>00150   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abef5690fcbd119e1d21e1c3fb029b710" title="The X error flag.">m_x_flag</a> ) {
<a name="l00151"></a>00151     new_size += 6 * size;
<a name="l00152"></a>00152   }
<a name="l00153"></a>00153   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a4ccd42bda77a1b13b995ac3ccf9d662f" title="The Y error flag.">m_y_flag</a> ) {
<a name="l00154"></a>00154     new_size += 6 * size;
<a name="l00155"></a>00155   }
<a name="l00156"></a>00156 
<a name="l00157"></a>00157   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>.reserve ( new_size );
<a name="l00158"></a>00158   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>.reserve ( new_size );
<a name="l00159"></a>00159 
<a name="l00160"></a>00160   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#aadf6f1caca6f4abf08f9b2d2ef96a9fd" title="Gets the ranges of the plotter on X and Y axis.">getRanges</a> ( view );
<a name="l00161"></a>00161 
<a name="l00162"></a>00162   <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; size; i++ ) {
<a name="l00163"></a>00163     <span class="keyword">const</span> vector &lt; double &gt; &amp; row = ntuple -&gt; getRow ( i );
<a name="l00164"></a>00164     <span class="keywordtype">double</span> x = row [ <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">dp::X</a> ];
<a name="l00165"></a>00165     <span class="keywordtype">double</span> y = row [ <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">dp::Y</a> ];
<a name="l00166"></a>00166 
<a name="l00167"></a>00167     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abef5690fcbd119e1d21e1c3fb029b710" title="The X error flag.">m_x_flag</a> == <span class="keyword">true</span> ) {
<a name="l00168"></a>00168       <span class="keywordtype">double</span> err = row [ <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15ac577aa01d3f00f9cfae6e981756f5402" title="error on X or half bin width">dp::XERR</a> ];
<a name="l00169"></a>00169       <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a91af204016a4b344bb6a9e298d4465f6" title="Creates the line segment for the X error bar.">drawXError</a> ( x, y, err, *transform );
<a name="l00170"></a>00170     }
<a name="l00171"></a>00171 
<a name="l00172"></a>00172     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a4ccd42bda77a1b13b995ac3ccf9d662f" title="The Y error flag.">m_y_flag</a> == <span class="keyword">true</span> ) {
<a name="l00173"></a>00173       <span class="keywordtype">double</span> err = row [ <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a877f1ecdc13e795de8b440216711b10d" title="error on Y">dp::YERR</a> ];
<a name="l00174"></a>00174       <a class="code" href="classhippodraw_1_1ErrorBarRep.html#af040c87e408fb65f225b1084d1ed64d8" title="Creates the line segment for the Y error bar.">drawYError</a> ( x, y, err, *transform );
<a name="l00175"></a>00175     }
<a name="l00176"></a>00176   }
<a name="l00177"></a>00177 
<a name="l00178"></a>00178   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = view -&gt; getUserRect ();
<a name="l00179"></a>00179   user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a4d3aa2a3a88746ce6270b68812faca3c" title="Changes the coordinates so that they are inside or on the boundary of the rectangle...">makeInBounds</a> ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>, <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a> );
<a name="l00180"></a>00180   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Color.html" title="A Color class for creating the color object following the standard RGB color space...">Color</a> &amp; cur_color = <a class="code" href="classhippodraw_1_1RepBase.html#a773111ba654ae3ca61330c4e136c4946" title="Returns the representation&amp;#39;s color.">color</a> ();
<a name="l00181"></a>00181 
<a name="l00182"></a>00182   view -&gt; drawLines ( <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a0f2c5fdf0a88d6b2cd2d017b21b8096c" title="A cache of the X errors.">m_x_err</a>, <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a96b725a47d784dd9dee9a608b57ee81e" title="A cache of the Y errors.">m_y_err</a>, <a class="code" href="namespacehippodraw_1_1Line.html#addb2fa415e015ee482fa2cd9eba96af7a454a9f774a1f745414146aa891d201f0" title="________">Line::Solid</a>, cur_color, <a class="code" href="classhippodraw_1_1RepBase.html#a62b5da1fc596e97288d8b46245437ade" title="The size of the representation.">m_size</a> );
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 <span class="keywordtype">void</span>
<a name="l00186"></a>00186 <a class="code" href="classhippodraw_1_1ErrorBarRep.html#aadf6f1caca6f4abf08f9b2d2ef96a9fd" title="Gets the ranges of the plotter on X and Y axis.">ErrorBarRep::</a>
<a name="l00187"></a><a class="code" href="classhippodraw_1_1ErrorBarRep.html#aadf6f1caca6f4abf08f9b2d2ef96a9fd">00187</a> <a class="code" href="classhippodraw_1_1ErrorBarRep.html#aadf6f1caca6f4abf08f9b2d2ef96a9fd" title="Gets the ranges of the plotter on X and Y axis.">getRanges</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> * view )
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#abedd9e4d36b29623422f6834c95d0fcd" title="The X axis range for cap calculation.">m_x_range</a> = view -&gt; getRange ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> );
<a name="l00190"></a>00190   <a class="code" href="classhippodraw_1_1ErrorBarRep.html#a47a24e0919ab61b0776d358f254fe1ec" title="The Y axis range for cap calculation.">m_y_range</a> = view -&gt; getRange ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> );
<a name="l00191"></a>00191 }
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
</a> </small></address>
</body>
</html>