VTK  9.1.0
vtkPolyDataItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPolyDataItem.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 vtkPolyDataItem_h
25#define vtkPolyDataItem_h
26
27#include "vtkContextItem.h"
28#include "vtkRenderingContext2DModule.h" // For export macro
29
30class vtkPolyData;
32
33class VTKRENDERINGCONTEXT2D_EXPORT vtkPolyDataItem : public vtkContextItem
34{
35public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
44 bool Paint(vtkContext2D* painter) override;
45
49 void SetPolyData(vtkPolyData* polyData);
50
56
60 vtkGetObjectMacro(PolyData, vtkPolyData);
61
65 vtkSetVector2Macro(Position, float);
66
70 vtkSetMacro(ScalarMode, int);
71
72protected:
74 ~vtkPolyDataItem() override;
75
76 class DrawHintsHelper;
77 DrawHintsHelper* HintHelper;
78
79 float Position[2];
80
82
84
86
87private:
88 vtkPolyDataItem(const vtkPolyDataItem&) = delete;
89 void operator=(const vtkPolyDataItem&) = delete;
90};
91
92#endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
base class for items that are part of a vtkContextScene.
a simple class to control print indentation
Definition: vtkIndent.h:113
Filter that translate a vtkPolyData 2D mesh into vtkContextItems.
void SetPolyData(vtkPolyData *polyData)
Set the PolyData of the item.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnsignedCharArray * MappedColors
bool Paint(vtkContext2D *painter) override
Paint event for the item.
~vtkPolyDataItem() override
DrawHintsHelper * HintHelper
static vtkPolyDataItem * New()
void SetMappedColors(vtkUnsignedCharArray *colors)
Set mapped colors.
vtkPolyData * PolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
dynamic, self-adjusting array of unsigned char