Viskores  1.0
TextRenderer.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_rendering_TextRenderer_h
20 #define viskores_rendering_TextRenderer_h
21 
22 #include <string>
23 
28 
29 namespace viskores
30 {
31 namespace rendering
32 {
33 class TextRendererBatcher;
34 
35 class VISKORES_RENDERING_EXPORT TextRenderer
36 {
37 public:
43 
45  void RenderText(const viskores::Vec2f_32& position,
46  viskores::Float32 scale,
47  viskores::Float32 angle,
48  viskores::Float32 windowAspect,
49  const viskores::Vec2f_32& anchor,
50  const viskores::rendering::Color& color,
51  const std::string& text);
52 
54  void RenderText(const viskores::Vec3f_32& origin,
55  const viskores::Vec3f_32& right,
56  const viskores::Vec3f_32& up,
57  viskores::Float32 scale,
58  const viskores::Vec2f_32& anchor,
59  const viskores::rendering::Color& color,
60  const std::string& text);
61 
63  void RenderText(const viskores::Matrix<viskores::Float32, 4, 4>& transform,
64  viskores::Float32 scale,
65  const viskores::Vec2f_32& anchor,
66  const viskores::rendering::Color& color,
67  const std::string& text,
68  const viskores::Float32& depth = 0.f);
69 
70 private:
75 };
76 }
77 } // namespace viskores::rendering
78 
79 #endif // viskores_rendering_TextRenderer_h
viskores::rendering::TextRenderer
Definition: TextRenderer.h:35
viskores::rendering::TextRenderer::Font
viskores::rendering::BitmapFont Font
Definition: TextRenderer.h:72
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:165
viskores::rendering::TextRenderer::Canvas
const viskores::rendering::Canvas * Canvas
Definition: TextRenderer.h:71
viskores::rendering::TextRenderer::TextBatcher
viskores::rendering::TextRendererBatcher * TextBatcher
Definition: TextRenderer.h:74
viskores::Matrix< viskores::Float32, 4, 4 >
viskores::rendering::Texture2D< 1 >
viskores::rendering::TextRenderer::FontTexture
viskores::rendering::Canvas::FontTextureType FontTexture
Definition: TextRenderer.h:73
BitmapFont.h
viskores::rendering::TextRendererBatcher
Definition: TextRendererBatcher.h:35
Color.h
viskores_rendering_export.h
Canvas.h
viskores::rendering::BitmapFont
Definition: BitmapFont.h:33
viskores::Vec< viskores::Float32, 2 >
viskores::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:43
viskores::rendering::Color
Representation of a color.
Definition: Color.h:37