vtkPlotLine.h 2.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkPlotLine.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

16 17
// .NAME vtkPlotLine - Class for drawing an XY line plot given two columns from
// a vtkTable.
18 19 20 21
//
// .SECTION Description
//

22 23
#ifndef vtkPlotLine_h
#define vtkPlotLine_h
24

25
#include "vtkChartsCoreModule.h" // For export macro
26
#include "vtkPlotPoints.h"
27

28
class VTKCHARTSCORE_EXPORT vtkPlotLine : public vtkPlotPoints
29 30
{
public:
31
  vtkTypeMacro(vtkPlotLine, vtkPlotPoints);
32 33 34 35 36 37 38
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  // Description:
  // Creates a 2D Chart object.
  static vtkPlotLine *New();

  // Description:
39
  // Paint event for the XY plot, called whenever the chart needs to be drawn.
40 41
  virtual bool Paint(vtkContext2D *painter);

42 43 44 45 46
  // Description:
  // Paint legend event for the XY plot, called whenever the legend needs the
  // plot items symbol/mark/line drawn. A rect is supplied with the lower left
  // corner of the rect (elements 0 and 1) and with width x height (elements 2
  // and 3). The plot can choose how to fill the space supplied.
47 48
  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
                           int legendIndex);
49

50 51 52 53 54 55 56 57 58 59
  // Description:
  // Turn on/off flag to control whether the points define a poly line
  // (true) or multiple line segments (false).
  // If true (default), a segment is drawn between each points
  // (e.g. [P1P2, P2P3, P3P4...].) If false, a segment is drawn for each pair
  // of points (e.g. [P1P2, P3P4,...].)
  vtkSetMacro(PolyLine,bool);
  vtkGetMacro(PolyLine,bool);
  vtkBooleanMacro(PolyLine,bool);

60 61 62 63
protected:
  vtkPlotLine();
  ~vtkPlotLine();

64 65 66 67
  // Description:
  // Poly line (true) or line segments(false).
  bool PolyLine;

68
private:
69
  vtkPlotLine(const vtkPlotLine &) VTK_DELETE_FUNCTION;
70
  void operator=(const vtkPlotLine &) VTK_DELETE_FUNCTION;
71 72 73

};

74
#endif //vtkPlotLine_h