pub fn draw_rounded_rectf(x: i32, y: i32, w: i32, h: i32, r: i32)Expand description
Draws a filled rounded rectangle
Examples found in repository?
examples/shapedwindow_taskbar.rs (line 136)
127fn prep_shape(w: i32, h: i32) -> image::RgbImage {
128 let surf = surface::ImageSurface::new(w, h, false);
129
130 surface::ImageSurface::push_current(&surf);
131
132 draw::set_draw_color(enums::Color::Black);
133 draw::draw_rectf(-1, -1, w + 2, h + 2);
134
135 draw::set_draw_color(enums::Color::White);
136 draw::draw_rounded_rectf(0, 0, w, h, 16);
137
138 let img = surf.image().unwrap();
139
140 surface::ImageSurface::pop_current();
141
142 img
143}