mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
@@ -702,7 +702,7 @@ fn fill_closed_path(feathering: f32, path: &mut [PathPoint], color: Color32, out
|
||||
if cw_signed_area(path) < 0.0 {
|
||||
// Wrong winding order - fix:
|
||||
path.reverse();
|
||||
for point in path.iter_mut() {
|
||||
for point in &mut *path {
|
||||
point.normal = -point.normal;
|
||||
}
|
||||
}
|
||||
@@ -772,7 +772,7 @@ fn fill_closed_path_with_uv(
|
||||
if cw_signed_area(path) < 0.0 {
|
||||
// Wrong winding order - fix:
|
||||
path.reverse();
|
||||
for point in path.iter_mut() {
|
||||
for point in &mut *path {
|
||||
point.normal = -point.normal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,15 +273,18 @@ impl FontImpl {
|
||||
if glyph_width == 0 || glyph_height == 0 {
|
||||
UvRect::default()
|
||||
} else {
|
||||
let atlas = &mut self.atlas.lock();
|
||||
let (glyph_pos, image) = atlas.allocate((glyph_width, glyph_height));
|
||||
glyph.draw(|x, y, v| {
|
||||
if v > 0.0 {
|
||||
let px = glyph_pos.0 + x as usize;
|
||||
let py = glyph_pos.1 + y as usize;
|
||||
image[(px, py)] = v;
|
||||
}
|
||||
});
|
||||
let glyph_pos = {
|
||||
let atlas = &mut self.atlas.lock();
|
||||
let (glyph_pos, image) = atlas.allocate((glyph_width, glyph_height));
|
||||
glyph.draw(|x, y, v| {
|
||||
if 0.0 < v {
|
||||
let px = glyph_pos.0 + x as usize;
|
||||
let py = glyph_pos.1 + y as usize;
|
||||
image[(px, py)] = v;
|
||||
}
|
||||
});
|
||||
glyph_pos
|
||||
};
|
||||
|
||||
let offset_in_pixels = vec2(bb.min.x, bb.min.y);
|
||||
let offset =
|
||||
|
||||
Reference in New Issue
Block a user