ui::GradientStops¶
Header: winui/render/Brush.hpp.
The stops of a gradient brush, in order: a list kept inside the brush up to four stops, so handing a theme's gradient to a control or a renderer allocates nothing. More stops go to the heap. Built like a vector, from a braced list or from a std::vector<GradientStop>, and read like one.
Example:
ui::GradientStops stops{{0.0f, ui::colors::White}, {1.0f, ui::colors::Black}};
stops.push_back({0.5f, ui::Color::from_rgba(128, 128, 128)});
for (const ui::GradientStop& stop : stops) { (void)stop.offset; }
InlineCapacity¶
How many stops fit without allocating.
GradientStops¶
GradientStops¶
The stops in stops, in order.
GradientStops¶
The stops in stops, in order.
GradientStops¶
GradientStops¶
operator=¶
operator=¶
~GradientStops¶
size¶
How many stops there are.
empty¶
Whether there are none, which paints nothing.
begin¶
The first stop.
end¶
One past the last stop.
begin¶
The first stop.
end¶
One past the last stop.
data¶
The stops as one array of size() elements.
data¶
The stops as one array of size() elements.
operator[]¶
Stop i, below size().
operator[]¶
Stop i, below size().
front¶
The first stop; there must be one.
back¶
The last stop; there must be one.
front¶
The first stop; there must be one.
back¶
The last stop; there must be one.
push_back¶
Adds stop after the last one.
clear¶
Removes every stop.
to_vector¶
The stops as a vector.