VTK  9.3.0
vtkLabeledContourPolyDataItem.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkLabeledContourPolyDataItem_h
16#define vtkLabeledContourPolyDataItem_h
17
18#include "vtkPolyDataItem.h"
19#include "vtkRect.h" // For vtkRect/vtkVector/vtkTuple
20#include "vtkRenderingContext2DModule.h" // For export macro
21#include "vtkSmartPointer.h" // For vtkSmartPointer
22
23VTK_ABI_NAMESPACE_BEGIN
24class vtkActor;
25class vtkContext2D;
26class vtkDoubleArray;
27class vtkRenderer;
28class vtkTextActor3D;
29class vtkTextProperty;
31struct PDILabelHelper;
32
33class VTKRENDERINGCONTEXT2D_EXPORT vtkLabeledContourPolyDataItem : public vtkPolyDataItem
34{
35public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
44 bool Paint(vtkContext2D* painter) override;
45
53 virtual void SetTextProperty(vtkTextProperty* tprop);
54
56
76
78
85 virtual void SetTextPropertyMapping(vtkDoubleArray* mapping);
87
89
94 vtkSetMacro(LabelVisibility, bool);
95 vtkGetMacro(LabelVisibility, bool);
96 vtkBooleanMacro(LabelVisibility, bool);
98
100
104 vtkSetMacro(SkipDistance, double);
105 vtkGetMacro(SkipDistance, double);
107
108protected:
111
112 virtual void ComputeBounds();
113
114 void Reset();
115
121 virtual bool CreateLabels();
123
126
128
133
134 PDILabelHelper** LabelHelpers;
135
138
140
141private:
143 void operator=(const vtkLabeledContourPolyDataItem&) = delete;
144
145 struct Private;
146 Private* Internal;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
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:29
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:59
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:315