VTK-m  2.0
TextRenderer.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_TextRenderer_h
12 #define vtk_m_rendering_TextRenderer_h
13 
14 #include <string>
15 
17 #include <vtkm/rendering/Canvas.h>
18 #include <vtkm/rendering/Color.h>
19 #include <vtkm/rendering/vtkm_rendering_export.h>
20 
21 namespace vtkm
22 {
23 namespace rendering
24 {
25 class TextRendererBatcher;
26 
27 class VTKM_RENDERING_EXPORT TextRenderer
28 {
29 public:
30  VTKM_CONT
32  const vtkm::rendering::BitmapFont& font,
35 
36  VTKM_CONT
37  void RenderText(const vtkm::Vec2f_32& position,
38  vtkm::Float32 scale,
39  vtkm::Float32 angle,
40  vtkm::Float32 windowAspect,
41  const vtkm::Vec2f_32& anchor,
42  const vtkm::rendering::Color& color,
43  const std::string& text);
44 
45  VTKM_CONT
46  void RenderText(const vtkm::Vec3f_32& origin,
47  const vtkm::Vec3f_32& right,
48  const vtkm::Vec3f_32& up,
49  vtkm::Float32 scale,
50  const vtkm::Vec2f_32& anchor,
51  const vtkm::rendering::Color& color,
52  const std::string& text);
53 
54  VTKM_CONT
55  void RenderText(const vtkm::Matrix<vtkm::Float32, 4, 4>& transform,
56  vtkm::Float32 scale,
57  const vtkm::Vec2f_32& anchor,
58  const vtkm::rendering::Color& color,
59  const std::string& text,
60  const vtkm::Float32& depth = 0.f);
61 
62 private:
67 };
68 }
69 } // namespace vtkm::rendering
70 
71 #endif // vtk_m_rendering_TextRenderer_h
vtkm::rendering::TextRenderer
Definition: TextRenderer.h:27
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::BitmapFont
Definition: BitmapFont.h:25
vtkm::rendering::TextRenderer::Canvas
const vtkm::rendering::Canvas * Canvas
Definition: TextRenderer.h:63
vtkm::rendering::Canvas
Definition: Canvas.h:34
vtkm::rendering::TextRendererBatcher
Definition: TextRendererBatcher.h:27
vtkm::rendering::TextRenderer::FontTexture
vtkm::rendering::Canvas::FontTextureType FontTexture
Definition: TextRenderer.h:65
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::TextRenderer::TextBatcher
vtkm::rendering::TextRendererBatcher * TextBatcher
Definition: TextRenderer.h:66
vtkm::Vec< vtkm::Float32, 2 >
vtkm::Matrix< vtkm::Float32, 4, 4 >
BitmapFont.h
vtkm::Float32
float Float32
Definition: Types.h:154
Color.h
Canvas.h
vtkm::rendering::Texture2D< 1 >
vtkm::rendering::TextRenderer::Font
vtkm::rendering::BitmapFont Font
Definition: TextRenderer.h:64