Debian Codegraph @

avogadro/rendering/textlabel2d.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_RENDERING_TEXTLABEL2D_H
7 #define AVOGADRO_RENDERING_TEXTLABEL2D_H
8
9 #include "avogadrorenderingexport.h"
10 #include "textlabelbase.h"
11
12 namespace Avogadro {
13 namespace Rendering {
14
15 /**
16 * @class TextLabel2D textlabel2d.h <avogadro/rendering/textlabel2d.h>
17 * @brief The TextLabel2D class renders text in an overlay plane, anchored to
18 * a point in window coordinates.
19 */
20 class AVOGADRORENDERING_EXPORT TextLabel2D : public TextLabelBase
21 {
22 public:
23 TextLabel2D();
24 ~TextLabel2D() override;
25
26 void accept(Visitor&) override;
27
28 /**
29 * The anchor point in window coordinates, taking the origin at the upper-left
30 * corner.
31 * @{
32 */
33 void setAnchor(const Vector2i& windowCoords);
34 Vector2i anchor() const;
35 /** @} */
36 };
37
38 } // namespace Rendering
39 } // namespace Avogadro
40
41 #endif // AVOGADRO_RENDERING_TEXTLABEL2D_H