Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
border_style.hpp File Reference
#include <pulp/view/view.hpp>
#include <optional>
#include <string_view>

Go to the source code of this file.

Classes

struct  pulp::view::BorderShades
 The two shades a 3D border style paints a side colour in, as Chromium resolves them. More...
struct  pulp::view::BorderBands
 How a side of width CSS px splits into bands for style: an outer band, a transparent gap, and an inner band, summing to width. More...
struct  pulp::view::CornerRadii
 A box's corner radii, each corner with a horizontal and a vertical radius. More...
struct  pulp::view::BandedBorder
 A banded border in its own border box, origin at the top-left corner. More...

Namespaces

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

Enumerations

enum class  pulp::view::BorderEdge { pulp::view::top , pulp::view::right , pulp::view::bottom , pulp::view::left }
 Which edge of the box a border side is on. More...

Functions

std::optional< View::BorderStyle > pulp::view::border_style_from_css (std::string_view keyword)
 The View::BorderStyle a CSS border-style / outline-style keyword names, or nullopt for anything that is not one of the ten CSS keywords.
BorderShades pulp::view::border_shades (Color side_color)
BorderBands pulp::view::border_bands (View::BorderStyle style, BorderEdge side, float width)
Color pulp::view::border_band_color (View::BorderStyle style, BorderEdge side, bool outer_band, Color side_color, float width)
 The colour style paints the outer or inner band of side in, for a side whose specified colour is side_color and width width.
bool pulp::view::is_banded_border_style (View::BorderStyle style)
 Whether style is painted in bands of per-side colour (double and the four 3D styles) rather than as one stroke.
CornerRadii pulp::view::fit_corner_radii (float width, float height, CornerRadii radii)
 radii fitted to a width x height box the way CSS fits border radii (CSS Backgrounds 3, "Overlapping Curves"): a negative radius is 0, and when the two radii along any side sum to more than that side, every radius is scaled by f = min over the four sides of (side length / sum of its two radii), so adjacent curves meet instead of crossing.
void pulp::view::paint_banded_border (canvas::Canvas &canvas, const BandedBorder &border)
 Paint border.