VTK  9.7.1
vtkPolyDataItem.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 vtkPolyDataItem_h
16 #define vtkPolyDataItem_h
17 
18 #include "vtkContextItem.h"
19 #include "vtkRenderingContext2DModule.h" // For export macro
20 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkPolyData;
25 
26 class VTKRENDERINGCONTEXT2D_EXPORT VTK_MARSHALAUTO vtkPolyDataItem : public vtkContextItem
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
32  static vtkPolyDataItem* New();
33 
37  bool Paint(vtkContext2D* painter) override;
38 
42  void SetPolyData(vtkPolyData* polyData);
43 
48  void SetMappedColors(vtkUnsignedCharArray* colors);
49 
53  vtkGetObjectMacro(PolyData, vtkPolyData);
54 
58  vtkSetVector2Macro(Position, float);
59 
63  vtkSetMacro(ScalarMode, int);
64 
65 protected:
67  ~vtkPolyDataItem() override;
68 
69  class DrawHintsHelper;
70  DrawHintsHelper* HintHelper;
71 
72  float Position[2];
73 
75 
77 
79 
80 private:
81  vtkPolyDataItem(const vtkPolyDataItem&) = delete;
82  void operator=(const vtkPolyDataItem&) = delete;
83 };
84 
85 VTK_ABI_NAMESPACE_END
86 #endif
DrawHintsHelper * HintHelper
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
vtkPolyData * PolyData
Filter that translate a vtkPolyData 2D mesh into vtkContextItems.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnsignedCharArray * MappedColors
dynamic, self-adjusting array of unsigned char
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...