floem icon indicating copy to clipboard operation
floem copied to clipboard

Clip view doesn't seem to anti-alias border-radius

Open jrmoulton opened this issue 1 year ago • 2 comments

Border Radius applied to a stack Screenshot 2023-09-24 at 7 35 44 PM Border radius applied to clip Screenshot 2023-09-24 at 7 35 40 PM

jrmoulton avatar Sep 25 '23 01:09 jrmoulton

https://github.com/audulus/vger-rs/pull/17 should fix this.

Zoxc avatar Jan 05 '24 13:01 Zoxc

Looks like this was never completely integrated with lapce/vger or something has broken since then. Clip no longer clips at all with border_radius

minimal example

use floem::{
    view::View,
    views::{clip, empty, Decorators},
};

fn app_view() -> impl View {
    clip(empty().style(|s| {
        s.background(floem::peniko::Color::rgba8(255, 0, 0, 150))
            .margin(10)
            .height(30)
            .width(20)
    }))
    .style(|s| s.border_radius(4))
}

fn main() {
    floem::launch(app_view);
}

jrmoulton avatar Feb 11 '24 07:02 jrmoulton