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

Track original SVG size (#7098)

This fixes bugs related to how an `Image` follows the size of an SVG.

We track the "source size" of each image, i.e. the original width/height
of the SVG, which can be different from whatever it was rasterized as.
This commit is contained in:
Emil Ernerfeldt
2025-05-28 08:33:01 +02:00
committed by GitHub
parent da67465a6c
commit 2cf6a3a9a6
12 changed files with 180 additions and 96 deletions

View File

@@ -419,10 +419,7 @@ impl TextureManager {
let height = 1;
ctx.load_texture(
"color_test_gradient",
epaint::ColorImage {
size: [width, height],
pixels,
},
epaint::ColorImage::new([width, height], pixels),
TextureOptions::LINEAR,
)
})