VTK  9.1.0
vtkLabeledContourPolyDataItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLabeledContourPolyDataItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm 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=========================================================================*/
24#ifndef vtkLabeledContourPolyDataItem_h
25#define vtkLabeledContourPolyDataItem_h
26
27#include "vtkPolyDataItem.h"
28#include "vtkRect.h" // For vtkRect/vtkVector/vtkTuple
29#include "vtkRenderingContext2DModule.h" // For export macro
30#include "vtkSmartPointer.h" // For vtkSmartPointer
31
32class vtkActor;
33class vtkContext2D;
34class vtkDoubleArray;
35class vtkRenderer;
36class vtkTextActor3D;
37class vtkTextProperty;
39struct PDILabelHelper;
40
41class VTKRENDERINGCONTEXT2D_EXPORT vtkLabeledContourPolyDataItem : public vtkPolyDataItem
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
52 bool Paint(vtkContext2D* painter) override;
53
61 virtual void SetTextProperty(vtkTextProperty* tprop);
62
64
84
86
93 virtual void SetTextPropertyMapping(vtkDoubleArray* mapping);
95
97
102 vtkSetMacro(LabelVisibility, bool);
103 vtkGetMacro(LabelVisibility, bool);
104 vtkBooleanMacro(LabelVisibility, bool);
106
108
112 vtkSetMacro(SkipDistance, double);
113 vtkGetMacro(SkipDistance, double);
115
116protected:
119
120 virtual void ComputeBounds();
121
122 void Reset();
123
129 virtual bool CreateLabels();
131
134
136
141
142 PDILabelHelper** LabelHelpers;
143
146
148
149private:
151 void operator=(const vtkLabeledContourPolyDataItem&) = delete;
152
153 struct Private;
154 Private* Internal;
155};
156
157#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
Filter that translate a vtkPolyData 2D mesh into vtkContextItems.
virtual vtkDoubleArray * GetTextPropertyMapping()
Values in this array correspond to vtkTextProperty objects in the TextProperties collection.
virtual void SetTextPropertyMapping(vtkDoubleArray *mapping)
Values in this array correspond to vtkTextProperty objects in the TextProperties collection.
virtual void SetTextProperty(vtkTextProperty *tprop)
The text property used to label the lines.
virtual vtkTextPropertyCollection * GetTextProperties()
The text properties used to label the lines.
bool AllocateTextActors(vtkIdType num)
vtkSmartPointer< vtkDoubleArray > TextPropertyMapping
vtkSmartPointer< vtkTextPropertyCollection > TextProperties
static vtkLabeledContourPolyDataItem * New()
virtual void SetTextProperties(vtkTextPropertyCollection *coll)
The text properties used to label the lines.
bool RenderLabels(vtkContext2D *painter)
bool Paint(vtkContext2D *painter) override
Paint event for the item.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkLabeledContourPolyDataItem() override
Filter that translate a vtkPolyData 2D mesh into vtkContextItems.
abstract specification for renderers
Definition: vtkRenderer.h:182
Hold a reference to a vtkObjectBase instance.
An actor that displays text.
an ordered list of vtkTextProperty objects.
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:52
int vtkIdType
Definition: vtkType.h:332