VTK  9.2.6
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=========================================================================*/
27#ifndef vtkLabeledContourPolyDataItem_h
28#define vtkLabeledContourPolyDataItem_h
29
30#include "vtkPolyDataItem.h"
31#include "vtkRect.h" // For vtkRect/vtkVector/vtkTuple
32#include "vtkRenderingContext2DModule.h" // For export macro
33#include "vtkSmartPointer.h" // For vtkSmartPointer
34
35class vtkActor;
36class vtkContext2D;
37class vtkDoubleArray;
38class vtkRenderer;
39class vtkTextActor3D;
40class vtkTextProperty;
42struct PDILabelHelper;
43
44class VTKRENDERINGCONTEXT2D_EXPORT vtkLabeledContourPolyDataItem : public vtkPolyDataItem
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
55 bool Paint(vtkContext2D* painter) override;
56
64 virtual void SetTextProperty(vtkTextProperty* tprop);
65
67
87
89
96 virtual void SetTextPropertyMapping(vtkDoubleArray* mapping);
98
100
105 vtkSetMacro(LabelVisibility, bool);
106 vtkGetMacro(LabelVisibility, bool);
107 vtkBooleanMacro(LabelVisibility, bool);
109
111
115 vtkSetMacro(SkipDistance, double);
116 vtkGetMacro(SkipDistance, double);
118
119protected:
122
123 virtual void ComputeBounds();
124
125 void Reset();
126
132 virtual bool CreateLabels();
134
137
139
144
145 PDILabelHelper** LabelHelpers;
146
149
151
152private:
154 void operator=(const vtkLabeledContourPolyDataItem&) = delete;
155
156 struct Private;
157 Private* Internal;
158};
159
160#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:52
Class for drawing 2D primitives to a graphical context.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:40
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:73
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
int vtkIdType
Definition vtkType.h:332