24#ifndef vtkBatchedLabeledDataMapper_h
25#define vtkBatchedLabeledDataMapper_h
28#include "vtkRenderingLabelModule.h"
33VTK_ABI_NAMESPACE_BEGIN
42VTK_ABI_NAMESPACE_BEGIN
79 vtkSetStringMacro(FrameColorsName);
80 vtkGetStringMacro(FrameColorsName);
106 vtkGetMacro(TextAnchor,
int);
115 vtkSetVector2Macro(DisplayOffset,
int);
116 vtkGetVector2Macro(DisplayOffset,
int);
191 int DisplayOffset[2] = { 0, 0 };
193 char* FrameColorsName =
nullptr;
196 std::unique_ptr<vtkInternals> Impl;
198 struct vtkBatchedLabeledDataMapperFormatter;
a actor that draws 2D data
const int * GetFrameWidths() const
Accessors for backend helper use in SetMapperShaderParameters.
static constexpr int GlyphAtlasColumnSize
Compile-time limits shared by the base class and both backend shaders.
vtkTextProperty * GetLabelTextProperty() override
Set/Get the text property.
void BuildLabelsInternal(vtkDataSet *) override
Formats labels for one dataset and populates the glyph atlas and shader arrays.
void AllocateLabels(int numLabels) override
Tracks the high-water mark of labels seen so far; no per-label allocation is needed.
void ReleaseGraphicsResources(vtkWindow *) override
Releases any GPU resources held by backend subclasses.
vtkMTimeType GetMTime() override
Overridden to take into account LabelTextProperty's mtime.
vtkBatchedLabeledDataMapper()
const int * GetDescenders() const
Accessors for backend helper use in SetMapperShaderParameters.
virtual void DeactivateGlyphTexture()
vtkTextProperty * GetLabelTextProperty(int type) override
Set/Get the text property.
void RenderOpaqueGeometry(vtkViewport *, vtkActor2D *) override
No-op: backend subclasses override this to drive the render pipeline.
vtkPolyData * GetPreparedPolyData() const
Accessors for backend helper use in SetMapperShaderParameters.
static constexpr int GlyphAtlasPadding
Compile-time limits shared by the base class and both backend shaders.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ActivateGlyphTexture()
Called before and after the helper renders to bind/unbind the atlas texture.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
TextAnchorTypes
Anchor option for labels.
@ UpperRight
Uses the upper right corner.
@ RightEdge
Uses the right edge center.
@ LowerRight
Uses the lower right corner.
@ Center
Uses the exact center.
@ LowerLeft
Uses the lower left corner.
@ LowerEdge
Uses the lower edge center.
@ UpperEdge
Uses the upper edge center.
@ UpperLeft
Uses the upper left corner.
@ LeftEdge
Uses the left edge center.
~vtkBatchedLabeledDataMapper() override
vtkImageData * GetGlyphAtlas() const
Accessors for backend helper use in SetMapperShaderParameters.
void RenderOverlay(vtkViewport *, vtkActor2D *) override
No-op: all label drawing happens in RenderOpaqueGeometry.
const float * GetBackgroundColors() const
Accessors for backend helper use in SetMapperShaderParameters.
const int * GetMaxGlyphHeights() const
Accessors for backend helper use in SetMapperShaderParameters.
void BuildLabels() override
Calls the superclass pipeline, then refreshes text-property attribute arrays.
static constexpr int MaxTextProperties
Compile-time limits shared by the base class and both backend shaders.
void MakeShaderArrays(int numCurLabels, const std::vector< std::string > &, vtkIntArray *, vtkFloatArray *, const std::vector< bool > &visible)
Converts formatted label strings into per-glyph vertex attributes (glyph extents, character offsets,...
void SetLabelTextProperty(vtkTextProperty *p) override
Set/Get the text property.
static vtkBatchedLabeledDataMapper * New()
virtual void UploadGlyphAtlas(vtkImageData *atlas)
Called by BuildLabels when the glyph atlas image has been rebuilt or updated.
void SetLabelTextProperty(vtkTextProperty *p, int type) override
Set/Get the text property.
void UpdateRenderWindowDPI(int dpi)
Called by backend subclasses from RenderOpaqueGeometry to propagate the render window DPI before Buil...
abstract class to specify dataset behavior
dynamic, self-adjusting array of float
topologically and geometrically regular array of data
a simple class to control print indentation
dynamic, self-adjusting array of int
concrete dataset represents vertices, lines, polygons, and triangle strips
represent text properties.
abstract specification for Viewports
window superclass for vtkRenderWindow
vtkTypeUInt32 vtkMTimeType
#define VTK_MARSHALMANUAL