1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Expose more epaint tessellator methods (#1384)

* Expose more tessellator method

* Make public the Tessellator methods to tessellate a circle, a
    mesh, a rectangle, a line, a path, a quadratic and cubic
    bezier curve.
* Add doc to tessellate_text.
* Add Mesh::append_ref method.

* Make tessellate_text take a reference

* Fix breaking change in benchmark
This commit is contained in:
jean-airoldie
2022-03-20 15:38:48 -04:00
committed by GitHub
parent 8bb381d50b
commit 734d4c57ad
3 changed files with 291 additions and 219 deletions

View File

@@ -129,7 +129,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let font_image_size = fonts.font_image_size();
c.bench_function("tessellate_text", |b| {
b.iter(|| {
tessellator.tessellate_text(font_image_size, text_shape.clone(), &mut mesh);
tessellator.tessellate_text(font_image_size, &text_shape, &mut mesh);
mesh.clear();
})
});