Sophie

Sophie

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

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_dd37c879693a21e1d65a2840272c12ab.html">graphics</a>
  </div>
</div>
<div class="contents">
<h1>DataView.cxx</h1><a href="DataView_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="comment">// inconsistent dll linkage</span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &quot;msdevstudio/MSconfig.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="DataView_8h.html" title="hippodraw::DataView class interface">DataView.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;<a class="code" href="FontBase_8h.html" title="FontBase class interface.">graphics/FontBase.h</a>&quot;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="Range_8h.html" title="hippodraw::Range class interface">axes/Range.h</a>&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="PlotterBase_8h.html" title="hippodraw::PlotterBase class interface.">plotters/PlotterBase.h</a>&quot;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="keyword">using namespace </span>hippodraw;
<a name="l00024"></a>00024 
<a name="l00025"></a><a class="code" href="classhippodraw_1_1DataView.html#a2e4473a4e7a96b00333b9a4c7234a04a">00025</a> DataView::DataView( )
<a name="l00026"></a>00026   : <a class="code" href="classhippodraw_1_1ViewBase.html" title="The abstract base class for views.">ViewBase</a> ()
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028 }
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <a class="code" href="classhippodraw_1_1DataView.html#a2e4473a4e7a96b00333b9a4c7234a04a" title="The default constructor.">DataView::</a>
<a name="l00031"></a><a class="code" href="classhippodraw_1_1DataView.html#ad57970ee0abafd030bf19e10123a2427">00031</a> <a class="code" href="classhippodraw_1_1DataView.html#a2e4473a4e7a96b00333b9a4c7234a04a" title="The default constructor.">DataView</a> ( <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter )
<a name="l00032"></a>00032   <span class="comment">// : ViewBase ( plotter )</span>
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034   <span class="comment">// Initilize list does not work with virtual class?</span>
<a name="l00035"></a>00035   <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> = plotter;
<a name="l00036"></a>00036 }
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <a class="code" href="classhippodraw_1_1DataView.html#a074dc62f2e951d825e9f35b5850132a8" title="The virtual destructor.">DataView::</a>
<a name="l00039"></a><a class="code" href="classhippodraw_1_1DataView.html#a074dc62f2e951d825e9f35b5850132a8">00039</a> <a class="code" href="classhippodraw_1_1DataView.html#a074dc62f2e951d825e9f35b5850132a8" title="The virtual destructor.">~DataView</a>()
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041 }
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp;
<a name="l00044"></a>00044 <a class="code" href="classhippodraw_1_1DataView.html#a68d755b4942b64218ef9b9921c412e2c" title="Returns the rectangle area in which data points are drawn.">DataView::</a>
<a name="l00045"></a><a class="code" href="classhippodraw_1_1DataView.html#a68d755b4942b64218ef9b9921c412e2c">00045</a> <a class="code" href="classhippodraw_1_1DataView.html#a68d755b4942b64218ef9b9921c412e2c" title="Returns the rectangle area in which data points are drawn.">getMarginRect</a> ()<span class="keyword"> const</span>
<a name="l00046"></a>00046 <span class="keyword"></span>{
<a name="l00047"></a>00047   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>;
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keywordtype">void</span>
<a name="l00051"></a>00051 <a class="code" href="classhippodraw_1_1DataView.html#a0a7a4ca5368b23573e6eb349a888dd81" title="Sets the margin rectangle.">DataView::</a>
<a name="l00052"></a><a class="code" href="classhippodraw_1_1DataView.html#a0a7a4ca5368b23573e6eb349a888dd81">00052</a> <a class="code" href="classhippodraw_1_1DataView.html#a0a7a4ca5368b23573e6eb349a888dd81" title="Sets the margin rectangle.">setMarginRect</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; rect )
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054   <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a> = rect;
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 
<a name="l00060"></a>00060 <span class="keywordtype">void</span>
<a name="l00061"></a>00061 <a class="code" href="classhippodraw_1_1DataView.html#a5958ddebacf2da2cfddeb0b6640677a7" title="Prepares the margin rectangle.">DataView::</a>
<a name="l00062"></a><a class="code" href="classhippodraw_1_1DataView.html#a5958ddebacf2da2cfddeb0b6640677a7">00062</a> <a class="code" href="classhippodraw_1_1DataView.html#a5958ddebacf2da2cfddeb0b6640677a7" title="Prepares the margin rectangle.">prepareMarginRect</a> ( )
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> draw = <a class="code" href="classhippodraw_1_1ViewBase.html#a4a8f555bf8d011b2eb5a2ba4a379bff3" title="Returns the drawing Rectangle in the devices coordinate system.">getDrawRect</a>();
<a name="l00065"></a>00065   <span class="keywordtype">float</span> width = draw.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>();
<a name="l00066"></a>00066   <span class="keywordtype">float</span> height = draw.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a>();
<a name="l00067"></a>00067 
<a name="l00068"></a>00068   <span class="keywordtype">float</span> marginXLeft = draw.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () * 0.20;
<a name="l00069"></a>00069   marginXLeft = std::min ( marginXLeft, 55.0f );
<a name="l00070"></a>00070   <span class="keywordtype">float</span> marginXRight = 20.0 ;
<a name="l00071"></a>00071 
<a name="l00072"></a>00072   <span class="comment">// Get a pointer to the plotter.</span>
<a name="l00073"></a>00073   <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a>* plotter = <a class="code" href="classhippodraw_1_1ViewBase.html#a78aa09930b4007dfa886e1ecb2dbf57b" title="Returns the plotter used by this view.">getPlotter</a>();
<a name="l00074"></a>00074 
<a name="l00075"></a>00075   <span class="comment">// Set and adjust top margin</span>
<a name="l00076"></a>00076   <span class="keywordtype">float</span> marginYTop = 30.0;
<a name="l00077"></a>00077   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; hasAxis ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a>) )
<a name="l00078"></a>00078     {
<a name="l00079"></a>00079       marginYTop = 70.0;
<a name="l00080"></a>00080     }
<a name="l00081"></a>00081   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a>* titlefont = plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#a26fff3ef0bc60d9b870b8bdd49bfaeb9" title="What font is being used to override the default while drawing title of plot.">titleFont</a>();
<a name="l00082"></a>00082   <span class="keywordflow">if</span> (titlefont) {
<a name="l00083"></a>00083     marginYTop = marginYTop+titlefont-&gt;<a class="code" href="classhippodraw_1_1FontBase.html#aad3bfdef486bcb87bc672b48314f019d" title="Get the pointsize of the font.">pointSize</a>()-9.0;
<a name="l00084"></a>00084   }
<a name="l00085"></a>00085   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a>* zfont = plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#afc1ccf4fead69ae3ef56a0228871ab65" title="What font is being used to override the default while drawing axis label.">labelFont</a>(<a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a>);
<a name="l00086"></a>00086   <span class="keywordflow">if</span> (zfont) {
<a name="l00087"></a>00087     marginYTop = marginYTop+zfont-&gt;<a class="code" href="classhippodraw_1_1FontBase.html#aad3bfdef486bcb87bc672b48314f019d" title="Get the pointsize of the font.">pointSize</a>()-7.0;
<a name="l00088"></a>00088   }
<a name="l00089"></a>00089    
<a name="l00090"></a>00090   <span class="comment">// Set and adjust bottom margin</span>
<a name="l00091"></a>00091   <span class="keywordtype">float</span> marginYBottom = 34.0 ;
<a name="l00092"></a>00092   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FontBase.html" title="A abstract base class for font handling.">FontBase</a>* labelfont = plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#afc1ccf4fead69ae3ef56a0228871ab65" title="What font is being used to override the default while drawing axis label.">labelFont</a>(<a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a>);
<a name="l00093"></a>00093   <span class="keywordflow">if</span> (labelfont) {
<a name="l00094"></a>00094     marginYBottom = marginYBottom+labelfont-&gt;<a class="code" href="classhippodraw_1_1FontBase.html#aad3bfdef486bcb87bc672b48314f019d" title="Get the pointsize of the font.">pointSize</a>()-11.0;
<a name="l00095"></a>00095   }
<a name="l00096"></a>00096 
<a name="l00097"></a>00097   <span class="comment">// Add additional margins. Now it can be added by PNG title, labels.</span>
<a name="l00098"></a>00098   marginYTop+=plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#aa462dbed2f64c1f50a6c2b870ea79441">getTopMargin</a>()+plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#ae3975442107174e634e59002866f2067">getZMargin</a>();
<a name="l00099"></a>00099   marginYBottom+=plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#a3125f8f76ea631df017a415f4c2bde1a">getBottomMargin</a>();
<a name="l00100"></a>00100   marginXLeft+=plotter-&gt;<a class="code" href="classhippodraw_1_1PlotterBase.html#a9ce20f08b6e104397f0d55d840714dd5">getLeftMargin</a>();
<a name="l00101"></a>00101 
<a name="l00102"></a>00102   <span class="keywordtype">double</span> aspect_ratio = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a92b295524262e25d2f5ae55a22ac3c87" title="Get the aspect ratio.">getAspectRatio</a> ();
<a name="l00103"></a>00103 
<a name="l00104"></a>00104   <span class="keywordtype">float</span> marginWidth = width - marginXLeft - marginXRight;
<a name="l00105"></a>00105   <span class="keywordtype">float</span> marginHeight =height - marginYTop - marginYBottom; 
<a name="l00106"></a>00106 
<a name="l00107"></a>00107   <span class="keywordflow">if</span> ( aspect_ratio &gt;  0.0 ) { 
<a name="l00108"></a>00108     <span class="keywordflow">if</span> ( marginWidth /aspect_ratio &gt; marginHeight ){
<a name="l00109"></a>00109       marginWidth = aspect_ratio*marginHeight;
<a name="l00110"></a>00110     } 
<a name="l00111"></a>00111     <span class="keywordflow">else</span> {
<a name="l00112"></a>00112       marginHeight = marginWidth/aspect_ratio;
<a name="l00113"></a>00113     }
<a name="l00114"></a>00114   }
<a name="l00115"></a>00115   
<a name="l00116"></a>00116   <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a4e35ed485a6c714ac8b2707bb152af60" title="Set the parameters of 2D Rectangle.">setRect</a> ( marginXLeft, marginYTop,
<a name="l00117"></a>00117                           marginWidth, marginHeight );
<a name="l00118"></a>00118 }
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 <span class="keywordtype">float</span>
<a name="l00121"></a>00121 <a class="code" href="classhippodraw_1_1DataView.html#ab04d1171abbedff5fed56c7a20fccee2" title="Converts the user X coordinate into the margin X coordinate.">DataView::</a>
<a name="l00122"></a><a class="code" href="classhippodraw_1_1DataView.html#ab04d1171abbedff5fed56c7a20fccee2">00122</a> <a class="code" href="classhippodraw_1_1DataView.html#ab04d1171abbedff5fed56c7a20fccee2" title="Converts the user X coordinate into the margin X coordinate.">userToMarginX</a> ( <span class="keywordtype">double</span> x )<span class="keyword"> const</span>
<a name="l00123"></a>00123 <span class="keyword"></span>{
<a name="l00124"></a>00124   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00125"></a>00125   <span class="keywordtype">double</span> diff = x - user_rect.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> ();
<a name="l00126"></a>00126   <span class="keywordtype">double</span> scale = <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a> ();
<a name="l00127"></a>00127   <span class="keywordtype">double</span> margin_x = <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> () + diff * scale;
<a name="l00128"></a>00128   <span class="keywordflow">return</span> margin_x;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="keywordtype">float</span>
<a name="l00132"></a>00132 <a class="code" href="classhippodraw_1_1DataView.html#a15a36bdc2a0c9fa333d56100a755c6c5" title="Converts the user X coordinate into the inverted X coordinate.">DataView::</a>
<a name="l00133"></a><a class="code" href="classhippodraw_1_1DataView.html#a15a36bdc2a0c9fa333d56100a755c6c5">00133</a> <a class="code" href="classhippodraw_1_1DataView.html#a15a36bdc2a0c9fa333d56100a755c6c5" title="Converts the user X coordinate into the inverted X coordinate.">userToInvertedMarginX</a> ( <span class="keywordtype">double</span> x )<span class="keyword"> const</span>
<a name="l00134"></a>00134 <span class="keyword"></span>{
<a name="l00135"></a>00135   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00136"></a>00136   <span class="keywordtype">double</span> diff = x - user_rect.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> ();
<a name="l00137"></a>00137   <span class="keywordtype">double</span> scale = <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a> ();
<a name="l00138"></a>00138   <span class="keywordtype">double</span> margin_ix = <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a>() + <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() - diff*scale;
<a name="l00139"></a>00139   <span class="keywordflow">return</span> margin_ix;
<a name="l00140"></a>00140 }
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 <span class="keywordtype">float</span>
<a name="l00143"></a>00143 <a class="code" href="classhippodraw_1_1DataView.html#a83bad97945ec0e23cc2b343bc383708c" title="Converts the user Y coordinate into the margin Y coordinate.">DataView::</a>
<a name="l00144"></a><a class="code" href="classhippodraw_1_1DataView.html#a83bad97945ec0e23cc2b343bc383708c">00144</a> <a class="code" href="classhippodraw_1_1DataView.html#a83bad97945ec0e23cc2b343bc383708c" title="Converts the user Y coordinate into the margin Y coordinate.">userToMarginY</a> ( <span class="keywordtype">double</span> y )<span class="keyword"> const</span>
<a name="l00145"></a>00145 <span class="keyword"></span>{
<a name="l00146"></a>00146   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00147"></a>00147   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () 
<a name="l00148"></a>00148     + ( y - user_rect.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () )
<a name="l00149"></a>00149     * <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> ();
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 
<a name="l00152"></a>00152 <span class="keywordtype">float</span>
<a name="l00153"></a>00153 <a class="code" href="classhippodraw_1_1DataView.html#ae98a2eca3fda293f98fd2af1764e0d11" title="Converts the user Y coordinate into the top-left based margin Y coordinate.">DataView::</a>
<a name="l00154"></a><a class="code" href="classhippodraw_1_1DataView.html#ae98a2eca3fda293f98fd2af1764e0d11">00154</a> <a class="code" href="classhippodraw_1_1DataView.html#ae98a2eca3fda293f98fd2af1764e0d11" title="Converts the user Y coordinate into the top-left based margin Y coordinate.">userToInvertedMarginY</a> ( <span class="keywordtype">double</span> y )<span class="keyword"> const</span>
<a name="l00155"></a>00155 <span class="keyword"></span>{
<a name="l00156"></a>00156   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00157"></a>00157   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () 
<a name="l00158"></a>00158     + <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> ()
<a name="l00159"></a>00159     - ( y - user_rect.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () )
<a name="l00160"></a>00160     * <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> ();
<a name="l00161"></a>00161 }
<a name="l00162"></a>00162 
<a name="l00163"></a>00163 <span class="keywordtype">float</span>
<a name="l00164"></a>00164 <a class="code" href="classhippodraw_1_1DataView.html#ae0b26e2015f57417f17a53eaef79a536" title="Converts the user Z coordinate into the margin color (X) coordinate.">DataView::</a>
<a name="l00165"></a><a class="code" href="classhippodraw_1_1DataView.html#ae0b26e2015f57417f17a53eaef79a536">00165</a> <a class="code" href="classhippodraw_1_1DataView.html#ae0b26e2015f57417f17a53eaef79a536" title="Converts the user Z coordinate into the margin color (X) coordinate.">userToMarginColor</a> ( <span class="keywordtype">double</span> c )<span class="keyword"> const</span>
<a name="l00166"></a>00166 <span class="keyword"></span>{
<a name="l00167"></a>00167   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00168"></a>00168 
<a name="l00169"></a>00169   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> () 
<a name="l00170"></a>00170     + ( c - user_rect.<a class="code" href="classhippodraw_1_1Rect.html#aa8d2d377de54332ea8f5c6191ddea692" title="A shortcut to get origin.Z.">getZ</a> () )
<a name="l00171"></a>00171     * <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a1adc74eef892f7566f7588640487a5bb" title="A shortcut to get size.depth.">getDepth</a> ();
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 <span class="keywordtype">double</span> 
<a name="l00175"></a>00175 <a class="code" href="classhippodraw_1_1DataView.html#a89d3a971fe1c4fcbb4acadbc92a52247" title="Converts from view coordinate to data coordinate, without taking into account transforms...">DataView::</a>
<a name="l00176"></a><a class="code" href="classhippodraw_1_1DataView.html#a89d3a971fe1c4fcbb4acadbc92a52247">00176</a> <a class="code" href="classhippodraw_1_1DataView.html#a89d3a971fe1c4fcbb4acadbc92a52247" title="Converts from view coordinate to data coordinate, without taking into account transforms...">marginToUserX</a> ( <span class="keywordtype">double</span> x )<span class="keyword"> const</span>
<a name="l00177"></a>00177 <span class="keyword"></span>{
<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 = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00179"></a>00179 
<a name="l00180"></a>00180   <span class="keywordflow">return</span> user_rect.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> () 
<a name="l00181"></a>00181     + ( x - <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a>() ) 
<a name="l00182"></a>00182     / ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() ); 
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 <span class="keywordtype">double</span> 
<a name="l00186"></a>00186 <a class="code" href="classhippodraw_1_1DataView.html#a9624b072ad0e9c025a7286b3a80f8874" title="Converts from view coordinate to data conordiate, take into account the inversion...">DataView::</a>
<a name="l00187"></a><a class="code" href="classhippodraw_1_1DataView.html#a9624b072ad0e9c025a7286b3a80f8874">00187</a> <a class="code" href="classhippodraw_1_1DataView.html#a9624b072ad0e9c025a7286b3a80f8874" title="Converts from view coordinate to data conordiate, take into account the inversion...">marginToInvertedUserX</a> ( <span class="keywordtype">double</span> x )<span class="keyword"> const</span>
<a name="l00188"></a>00188 <span class="keyword"></span>{
<a name="l00189"></a>00189   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00190"></a>00190 
<a name="l00191"></a>00191   <span class="keywordflow">return</span> user_rect.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a> () 
<a name="l00192"></a>00192     + ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#af71e522ec6aa935c2618819b54f20e02" title="A shortcut to get origin.X.">getX</a>() + <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() - x ) 
<a name="l00193"></a>00193     / ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#a5410fe8e5b318eb82d84dcccf3634d8b" title="A shortcut to get size.width.">getWidth</a>() ); 
<a name="l00194"></a>00194 }
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="keywordtype">double</span>
<a name="l00197"></a>00197 <a class="code" href="classhippodraw_1_1DataView.html#adb0de5fec5222b68cf37c3d4fba3a5a6" title="Converts from view coordinate to data coordinate, without taking into account transforms...">DataView::</a>
<a name="l00198"></a><a class="code" href="classhippodraw_1_1DataView.html#adb0de5fec5222b68cf37c3d4fba3a5a6">00198</a> <a class="code" href="classhippodraw_1_1DataView.html#adb0de5fec5222b68cf37c3d4fba3a5a6" title="Converts from view coordinate to data coordinate, without taking into account transforms...">marginToUserY</a> ( <span class="keywordtype">double</span> y )<span class="keyword"> const</span>
<a name="l00199"></a>00199 <span class="keyword"></span>{
<a name="l00200"></a>00200   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00201"></a>00201 
<a name="l00202"></a>00202   <span class="keywordflow">return</span> user_rect.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () 
<a name="l00203"></a>00203     + ( y - <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a>() ) 
<a name="l00204"></a>00204     /  ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () * user_rect.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () );
<a name="l00205"></a>00205 }
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 <span class="keywordtype">double</span>
<a name="l00208"></a>00208 <a class="code" href="classhippodraw_1_1DataView.html#a48bdfcf650bd32575950147f16cde1c2" title="Converts from inverted view coordinate to data coordinate, without taking into account...">DataView::</a>
<a name="l00209"></a><a class="code" href="classhippodraw_1_1DataView.html#a48bdfcf650bd32575950147f16cde1c2">00209</a> <a class="code" href="classhippodraw_1_1DataView.html#a48bdfcf650bd32575950147f16cde1c2" title="Converts from inverted view coordinate to data coordinate, without taking into account...">marginToInvertedUserY</a> ( <span class="keywordtype">double</span> y )<span class="keyword"> const</span>
<a name="l00210"></a>00210 <span class="keyword"></span>{
<a name="l00211"></a>00211   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Rect.html" title="Class representing a rectangle.">Rect</a> &amp; user_rect = <a class="code" href="classhippodraw_1_1ViewBase.html#a1de80faff2428b8dc67995112931b636" title="The plotter object used by this view.">m_plotter</a> -&gt; <a class="code" href="classhippodraw_1_1ViewBase.html#a37e915d8c0c4dc48e3ae4a0525ca6157" title="Is called by the AxisRepBase object (or one of its derived objects), and returns...">getUserRect</a> ();
<a name="l00212"></a>00212 
<a name="l00213"></a>00213   <span class="keywordflow">return</span> user_rect.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a> () + 
<a name="l00214"></a>00214     ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#acd84440598b1da2a23c326ce371db4e4" title="A shortcut to get origin.Y.">getY</a>() 
<a name="l00215"></a>00215       + <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a>() - y ) 
<a name="l00216"></a>00216     / ( <a class="code" href="classhippodraw_1_1DataView.html#a5e8a764f031ecf7ec2a55dfa69a29a4c" title="The rectangle area in which the projected points are plotted.">m_margin_rect</a>.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () / user_rect.<a class="code" href="classhippodraw_1_1Rect.html#ab22b7a83bfd69953e9421f6941bc9304" title="A shortcut to get size.height.">getHeight</a> () ) ;
<a name="l00217"></a>00217 }
</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>