examples/dom/linear_gradient.cpp

    //Copyright2023ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<ftxui/dom/elements.hpp>//forbgcolor,operator|,operator|=,text,center,Element
    #include<ftxui/dom/linear_gradient.hpp>//forLinearGradient::Stop,LinearGradient
    #include<ftxui/screen/screen.hpp>//forFull,Screen
    #include<memory>//forallocator,shared_ptr

    #include"ftxui/dom/node.hpp"//forRender
    #include"ftxui/screen/color.hpp"//forColor,Color::DeepPink1,Color::DeepSkyBlue1,Color::Yellow,ftxui

    intmain(){
    usingnamespaceftxui;
    autodocument=text("gradient")|center;

    document|=bgcolor(LinearGradient()
    .Angle(45)
    .Stop(Color::DeepPink1)
    .Stop(Color::DeepSkyBlue1));
    autoscreen=Screen::Create(Dimension::Full(),Dimension::Full());
    Render(screen,document);
    screen.Print();

    return0;
    }