PlotEdge.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Plotting/Pulsar/PlotEdge.h
10 
11 #ifndef __Pulsar_PlotEdge_h
12 #define __Pulsar_PlotEdge_h
13 
14 #include "TextInterface.h"
15 
16 #include <utility>
17 
18 namespace Pulsar {
19 
21  class PlotEdge : public Reference::Able {
22 
23  public:
24 
25  PlotEdge () : viewport (0.15, 0.85) { }
26 
27  // Text interface to the PlotEdge class
28  class Interface : public TextInterface::To<PlotEdge> {
29  public:
30  Interface (PlotEdge* = 0);
31  };
32 
34  void set_viewport (const std::pair<float,float>& f) { viewport = f; }
35 
37  std::pair<float,float> get_viewport () const { return viewport; }
38 
39  protected:
40 
41  std::pair<float,float> viewport;
42 
43  };
44 
45 
46 }
47 
48 #endif
The edge of a plot viewport.
Definition: PlotEdge.h:26
void set_viewport(const std::pair< float, float > &f)
Set the viewport (normalized device coordinates)
Definition: PlotEdge.h:44
std::pair< float, float > get_viewport() const
Get the viewport (normalized device coordinates)
Definition: PlotEdge.h:47
Defines the PSRCHIVE library.
Definition: CalSource.h:17

Generated using doxygen 1.8.17