Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
css_effect_parse.hpp
Go to the documentation of this file.
1#pragma once
2
3// CSS effect values that a renderer needs as numbers and enums rather than as
4// strings: the blur radius out of a filter list, and a blend-mode keyword.
5//
6// These live apart from the import path because both render lanes need them
7// and neither owns them. Keeping them together is also what stops the two
8// lanes drifting — the JS bridge and the native tree read the same rules.
9
11
12#include <optional>
13#include <string>
14#include <string_view>
15#include <vector>
16
17namespace pulp::view {
18
26std::optional<float> css_blur_radius(const std::string& filter);
27
43std::vector<canvas::Canvas::FilterChainEntry> css_filter_chain(
44 const std::string& filter);
45
48std::optional<canvas::Canvas::BlendMode> css_blend_mode(const std::string& keyword);
49
62std::optional<float> css_transform_rotation(const std::string& transform);
63
67bool css_keyword_is_none(std::string_view value);
68
69} // namespace pulp::view
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
std::optional< canvas::Canvas::BlendMode > css_blend_mode(const std::string &keyword)
A CSS mix-blend-mode keyword.
@ keyword
Language keyword (e.g. if, return, class).
Definition code_editor_tokenizer.hpp:38
bool css_keyword_is_none(std::string_view value)
True for an empty value or the CSS keyword none, which keywords match case-insensitively and with sur...
std::vector< canvas::Canvas::FilterChainEntry > css_filter_chain(const std::string &filter)
A whole CSS filter list as the canvas layer verbs consume it, in source order — saturate(0....
std::optional< float > css_blur_radius(const std::string &filter)
The blur radius out of a CSS filter list, in px.
@ value
the widget's primary value (Knob, Fader, RangeSlider, Toggle, ProgressBar)
Definition binding_diagnostics.hpp:19
std::optional< float > css_transform_rotation(const std::string &transform)
The angle out of a rotate(<deg>deg) in a CSS transform, in degrees.