Function push_border_rrect_scaled

Source
pub fn push_border_rrect_scaled(
    out: &mut Vec<BorderRRectVertex>,
    w: f32,
    h: f32,
    scale: Scale,
    border: DrawBorder,
    width: f32,
    color: Color,
)
Expand description

Appends a rounded-border SDF quad in physical-pixel geometry.

The current shader uses the top-left radius for all corners. Width and radius are clamped nonnegative; bounds still append six vertices when empty.

ยงExamples

use ailloli_ui_core::{math::Scale, Color};
use ailloli_ui_render_wgpu::passes::push_border_rrect_scaled;
use ailloli_ui_runtime::DrawBorder;
fn build(border: DrawBorder) { let mut out = Vec::new(); push_border_rrect_scaled(&mut out, 100.0, 100.0, Scale::new(1.0), border, 1.0, Color::WHITE); assert_eq!(out.len(), 6); }