VTK  9.4.20241113
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkActor;
26class vtkContext2D;
27class vtkDoubleArray;
28class vtkRenderer;
29class vtkTextActor3D;
30class vtkTextProperty;
32struct PDILabelHelper;
33
34class VTKRENDERINGCONTEXT2D_EXPORT VTK_MARSHALAUTO vtkLabeledContourPolyDataItem
35 : public vtkPolyDataItem
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
46 bool Paint(vtkContext2D* painter) override;
47
55 virtual void SetTextProperty(vtkTextProperty* tprop);
56
58
78
80
87 virtual void SetTextPropertyMapping(vtkDoubleArray* mapping);
89
91
96 vtkSetMacro(LabelVisibility, bool);
97 vtkGetMacro(LabelVisibility, bool);
98 vtkBooleanMacro(LabelVisibility, bool);
100
102
106 vtkSetMacro(SkipDistance, double);
107 vtkGetMacro(SkipDistance, double);
109
110protected:
113
114 virtual void ComputeBounds();
115
116 void Reset();
117
123 virtual bool CreateLabels();
125
128
130
135
136 PDILabelHelper** LabelHelpers;
137
140
142
143private:
145 void operator=(const vtkLabeledContourPolyDataItem&) = delete;
146
147 struct Private;
148 Private* Internal;
149};
150
151VTK_ABI_NAMESPACE_END
152#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
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:108
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
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
#define VTK_MARSHALAUTO