Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
css_gradient.hpp File Reference
#include <functional>
#include <string>
#include <string_view>
#include <pulp/canvas/canvas.hpp>

Go to the source code of this file.

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Typedefs

using pulp::view::CssColorParser = std::function<canvas::Color(const std::string&)>
 Color parser callback: maps a single CSS color token (hex / rgb() / rgba()) to a canvas::Color.

Functions

canvas::Color pulp::view::parse_css_color (const std::string &token)
 The built-in CSS color parser: #RGB / #RRGGBB / #RRGGBBAA, rgb(), rgba(), hsl(), hsla(), oklab(), oklch(), and transparent.
bool pulp::view::css_color_syntax_supported (std::string_view token)
 True when token uses one of the CSS color syntaxes understood by parse_css_color().
bool pulp::view::apply_css_background_gradient (View &v, std::string_view css, const CssColorParser &parse_color={})
 Parse a CSS linear-gradient(...), radial-gradient(...), or conic-gradient(...) string and apply it to v's background via the View::set_background_gradient_* API.