1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Refactor TessellationOptions to expose slider for feathering size (#1408)

The epaint tessellator uses "feathering" to accomplish anti-aliasing. This PS allows you to control the feathering size, i.e. how blurry the edges of epaint shapes are.

This changes the interface of Tessellator slightly, and renames some options in TessellationOptions.
This commit is contained in:
Emil Ernerfeldt
2022-03-23 11:41:38 +01:00
committed by GitHub
parent a9fd03709e
commit 1387d6e9d6
7 changed files with 115 additions and 107 deletions

View File

@@ -123,7 +123,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
});
let galley = fonts.layout(LOREM_IPSUM_LONG.to_owned(), font_id, color, wrap_width);
let mut tessellator = egui::epaint::Tessellator::from_options(Default::default());
let mut tessellator = egui::epaint::Tessellator::new(1.0, Default::default());
let mut mesh = egui::epaint::Mesh::default();
let text_shape = TextShape::new(egui::Pos2::ZERO, galley);
let font_image_size = fonts.font_image_size();