mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 13:47:21 -06:00
render_node_thumbnail_with draws into a context of size.clamp(1, MAX_CONTEXT_SIDE) pixels but reported width and height as the requested size, so a size of 0 gave a 0x0 image holding 4 bytes. The view was also built from the requested size, and the fit scale (size - 2) / extent was 0 or negative at sizes 1 and 2, so the art drew nothing or mirrored. The thumbnail now reports the side it draws, builds the view from it, and drops the 1-pixel margin when the side is too small to keep one. Test: node_thumbnail_reports_the_size_it_draws.