vtkRulerSourceRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkRulerSourceRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkRulerSourceRepresentation_h
23 #define vtkRulerSourceRepresentation_h
24 
25 #include "vtkNew.h" //needed for instances of vtkPolyData
27 #include "vtkRemotingViewsModule.h" //needed for exports
28 
30 class vtkPolyData;
31 class vtkProperty2D;
32 class vtkTextProperty;
33 
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  void SetDistanceRepresentation(vtkDistanceRepresentation2D*);
46  vtkGetObjectMacro(DistanceRepresentation, vtkDistanceRepresentation2D);
48 
52  void SetTextProperty(vtkTextProperty* prop);
53 
57  void SetAxisLineWidth(float width);
58 
62  void SetAxisColor(double red, double green, double blue);
63 
67  void SetVisibility(bool) override;
68 
74  void SetLabelFormat(char* labelFormat);
75 
77 
84  void SetRulerMode(int choice);
85  int GetRulerMode();
87 
89 
94  void SetRulerDistance(double distance);
95  double GetRulerDistance();
97 
99 
104  void SetScale(double distance);
105  double GetScale();
107 
113  void SetNumberOfRulerTicks(int numberOfRulerTicks);
114 
122  vtkInformation* outInfo) override;
123 
124 protected:
126  ~vtkRulerSourceRepresentation() override;
127 
129 
133  int FillInputPortInformation(int port, vtkInformation* info) override;
134 
140  bool AddToView(vtkView* view) override;
141 
147  bool RemoveFromView(vtkView* view) override;
148 
151 
152 private:
154  void operator=(const vtkRulerSourceRepresentation&) = delete;
155 };
156 
157 #endif
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
bool AddToView(vtkView *view) override
Making these methods public.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkDistanceRepresentation2D * DistanceRepresentation
bool RemoveFromView(vtkView *view) override
Making these methods public.
static vtkDataRepresentation * New()
vtkRulerSourceRepresentation is a representation to show a ruler.
void PrintSelf(ostream &os, vtkIndent indent) override