diff --git a/Manual_tests.md b/Manual_tests.md index 8d121d9..e258940 100644 --- a/Manual_tests.md +++ b/Manual_tests.md @@ -12,6 +12,7 @@ record those here. * How the screen looks. Our tests use a level of indirection to check text and graphics printed to screen, but not the precise pixels they translate to. - where exactly the cursor is drawn to highlight a given character + - analogously, how a shape precisely looks as you draw it ### Other compromises diff --git a/drawing.lua b/drawing.lua index 33bdbc0..8263dd9 100644 --- a/drawing.lua +++ b/drawing.lua @@ -126,6 +126,9 @@ function Drawing.draw_pending_shape(drawing, top, left,right) local function py(y) return Drawing.pixels(y, width)+top end local mx = Drawing.coord(pmx-left, width) local my = Drawing.coord(pmy-top, width) + -- recreate pixels from coords to precisely mimic how the drawing will look + -- after mouse_released + pmx,pmy = px(mx), py(my) local shape = drawing.pending if shape.mode == nil then -- nothing pending