VTK-m  2.0
TextRendererBatcher.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_rendering_TextRendererBatcher_h
12 #define vtk_m_rendering_TextRendererBatcher_h
13 
14 #include <string>
15 #include <vector>
16 
18 #include <vtkm/rendering/Canvas.h>
19 #include <vtkm/rendering/Color.h>
20 #include <vtkm/rendering/vtkm_rendering_export.h>
21 
22 namespace vtkm
23 {
24 namespace rendering
25 {
26 
27 class VTKM_RENDERING_EXPORT TextRendererBatcher
28 {
29 public:
38 
39  /*
40  VTKM_CONT
41  TextRendererBatcher();
42  */
43 
44  VTKM_CONT
46 
47  VTKM_CONT
48  void BatchText(const ScreenCoordsArrayHandle& screenCoords,
49  const TextureCoordsArrayHandle& textureCoords,
50  const vtkm::rendering::Color& color,
51  const vtkm::Float32& depth);
52 
53  void Render(const vtkm::rendering::Canvas* canvas) const;
54 
55 private:
57  std::vector<ScreenCoordsType> ScreenCoords;
58  std::vector<TextureCoordsType> TextureCoords;
59  std::vector<ColorType> Colors;
60  std::vector<vtkm::Float32> Depths;
61 };
62 }
63 } // namespace vtkm::rendering
64 
65 #endif // vtk_m_rendering_TextRendererBatcher_h
vtkm::rendering::TextRendererBatcher::ScreenCoords
std::vector< ScreenCoordsType > ScreenCoords
Definition: TextRendererBatcher.h:57
vtkm::rendering::Canvas::FontTextureType
vtkm::rendering::Texture2D< 1 > FontTextureType
Definition: Canvas.h:39
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:283
vtkm::rendering::TextRendererBatcher::TextureCoords
std::vector< TextureCoordsType > TextureCoords
Definition: TextRendererBatcher.h:58
vtkm::rendering::Color
It's a color!
Definition: Color.h:28
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::TextRendererBatcher::FontTexture
vtkm::rendering::Canvas::FontTextureType FontTexture
Definition: TextRendererBatcher.h:56
vtkm::Vec4f_32
vtkm::Vec< vtkm::Float32, 4 > Vec4f_32
Vec4f_32 corresponds to a 4-dimensional vector of 32-bit floating point values.
Definition: Types.h:1136
vtkm::rendering::Canvas
Definition: Canvas.h:34
vtkm::rendering::TextRendererBatcher
Definition: TextRendererBatcher.h:27
vtkm::rendering::TextRendererBatcher::Depths
std::vector< vtkm::Float32 > Depths
Definition: TextRendererBatcher.h:60
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Vec
A short fixed-length array.
Definition: Types.h:767
BitmapFont.h
vtkm::Float32
float Float32
Definition: Types.h:154
Color.h
Canvas.h
vtkm::rendering::Texture2D< 1 >
vtkm::Id4
vtkm::Vec< vtkm::Id, 4 > Id4
Id4 corresponds to a 4-dimensional index.
Definition: Types.h:1119
vtkm::rendering::TextRendererBatcher::Colors
std::vector< ColorType > Colors
Definition: TextRendererBatcher.h:59