Gazebo Rendering
API Reference
9.0.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-rendering
include
gz
rendering
Text.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Open Source Robotics Foundation
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
#ifndef GZ_RENDERING_TEXT_HH_
18
#define GZ_RENDERING_TEXT_HH_
19
20
#include <string>
21
22
#include <
gz/math/AxisAlignedBox.hh
>
23
#include <
gz/math/Color.hh
>
24
25
#include "gz/rendering/config.hh"
26
#include "
gz/rendering/Geometry.hh
"
27
#include "
gz/rendering/Object.hh
"
28
29
namespace
gz
30
{
31
namespace
rendering
32
{
33
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
34
//
37
enum class
TextHorizontalAlign
38
{
40
LEFT
= 0,
42
CENTER
= 1,
44
RIGHT
= 2
45
};
46
49
enum class
TextVerticalAlign
50
{
52
BOTTOM
= 0,
54
CENTER
= 1,
56
TOP
= 2
57
};
58
62
class
GZ_RENDERING_VISIBLE
Text
:
63
public
virtual
Geometry
64
{
66
public
:
Text
() =
default
;
67
69
public
:
virtual
~Text
();
70
74
public
:
virtual
void
SetFontName
(
const
std::string
&_font) = 0;
75
79
public
:
virtual
std::string
FontName
()
const
= 0;
80
84
public
:
virtual
void
SetTextString
(
const
std::string
&_text) = 0;
85
89
public
:
virtual
std::string
TextString
()
const
= 0;
90
94
public
:
virtual
void
SetColor
(
const
gz::math::Color
&_color) = 0;
95
99
public
:
virtual
gz::math::Color
Color
()
const
= 0;
100
104
public
:
virtual
void
SetCharHeight
(
const
float
_height) = 0;
105
109
public
:
virtual
float
CharHeight
()
const
= 0;
110
114
public
:
virtual
void
SetSpaceWidth
(
const
float
_width) = 0;
115
119
public
:
virtual
float
SpaceWidth
()
const
= 0;
120
124
public
:
virtual
void
SetTextAlignment
(
const
TextHorizontalAlign
&_hAlign,
125
const
TextVerticalAlign
&_vAlign) = 0;
126
129
public
:
virtual
TextHorizontalAlign
HorizontalAlignment
()
const
= 0;
130
133
public
:
virtual
TextVerticalAlign
VerticalAlignment
()
const
= 0;
134
138
public
:
virtual
void
SetBaseline
(
const
float
_baseline) = 0;
139
143
public
:
virtual
float
Baseline
()
const
= 0;
144
149
public
:
virtual
void
SetShowOnTop
(
const
bool
_onTop) = 0;
150
154
public
:
virtual
bool
ShowOnTop
()
const
= 0;
155
158
public
:
virtual
gz::math::AxisAlignedBox
AABB
()
const
= 0;
159
};
160
}
161
}
162
}
163
164
#endif