#include <memory>
auto document = text("gradient") | center;
.Angle(45)
.Stop(Color::DeepPink1)
.Stop(Color::DeepSkyBlue1));
auto screen = Screen::Create(Dimension::Full(), Dimension::Full());
Render(screen, document);
screen.Print();
return 0;
}
Element bgcolor(const LinearGradient &gradient, Element child)
使用线性渐变效果设置元素的背景色。
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase