Eyedropper: the renderer's size as one (width, height) argument, as main's render takes it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
moppeeerandClaude Opus 5.5 committed 2026-10-30 15:33:46 +01:00
1 parent 12425aafd7
commit b77a1c29bd
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ pub fn color_at(app: &mut DesignApp, ctx: &egui::Context, pos: Pos2) -> Option<[
let ppp = ctx.pixels_per_point() as f64;
let view = Affine::scale(ppp) * Affine::scale(xf.zoom) * Affine::translate((-at.x, -at.y));
let opts = screen_options(app, &layout, app.ui.screen_mode != ScreenMode::Normal, ppp);
let mut img = app.canvas.patcher.render(&doc, &app.session.cache, &placed, 1, 1, view, &opts);
let mut img = app.canvas.patcher.render(&doc, &app.session.cache, &placed, (1, 1), view, &opts);
// The colour as the canvas shows it (proofed).
screen_post(app, &mut img);
let [r, g, b, a] = <[u8; 4]>::try_from(img.pixels.get(..4)?).ok()?;