TextNode.hpp
1 #pragma once
2 
3 #include <Gfx/Graph/Node.hpp>
4 
5 #include <QFont>
6 #include <QPen>
7 
8 namespace score::gfx
9 {
14 {
15 public:
16  explicit TextNode();
17  virtual ~TextNode();
18 
19  score::gfx::NodeRenderer* createRenderer(RenderList& r) const noexcept override;
20 
21  void process(Message&& msg) override;
22  class Renderer;
23 
24 #pragma pack(push, 1)
25  struct UBO
26  {
27  float opacity{1.};
28  float padding_std140_0{};
29  float position[2]{0.5, 0.5};
30  float scale[2]{1., 1.};
31  } ubo;
32 #pragma pack(pop)
33 
34  QString text;
35  QFont font;
36  QPen pen;
37 
38  std::atomic_bool mustRerender{true};
39 
40 private:
41 };
42 
43 }
Common base class for most single-pass, simple nodes.
Definition: score-plugin-gfx/Gfx/Graph/Node.hpp:181
Renderer for a given node.
Definition: NodeRenderer.hpp:11
List of nodes to be rendered to an output.
Definition: RenderList.hpp:19
Definition: TextNode.cpp:81
Graphics rendering pipeline for ossia score.
Definition: Filter/PreviewWidget.hpp:12
Definition: score-plugin-gfx/Gfx/Graph/Node.hpp:51
Definition: TextNode.hpp:26
A node that renders text to screen.
Definition: TextNode.hpp:14
score::gfx::NodeRenderer * createRenderer(RenderList &r) const noexcept override
Create a renderer in a given context for this node.
Definition: TextNode.cpp:193
void process(Message &&msg) override
Process a message from the execution engine.
Definition: TextNode.cpp:198