FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/dom/linear_gradient.cpp
Go to the documentation of this file.
1// Copyright 2023 Arthur Sonzogni. All rights reserved.
2// このソースコードの使用は、LICENSE ファイルにある MIT ライセンスによって管理されています。
3#include <ftxui/dom/elements.hpp> // for bgcolor, operator|, operator|=, text, center, Element
4#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient::Stop, LinearGradient
5#include <ftxui/screen/screen.hpp> // for Full, Screen
6#include <memory> // for allocator, shared_ptr
7
8#include "ftxui/dom/node.hpp" // for Render
9#include "ftxui/screen/color.hpp" // for Color, Color::DeepPink1, Color::DeepSkyBlue1, Color::Yellow, ftxui
10
11int main() {
12 using namespace ftxui;
13 auto document = text("gradient") | center;
14
15 document |= bgcolor(LinearGradient()
16 .Angle(45)
17 .Stop(Color::DeepPink1)
18 .Stop(Color::DeepSkyBlue1));
19 auto screen = Screen::Create(Dimension::Full(), Dimension::Full());
20 Render(screen, document);
21 screen.Print();
22
23 return 0;
24}
線形グラデーションカラー効果の設定を表すクラスです。
FTXUI ftxui:: 名前空間
Definition animation.hpp:9