From 1cb71758b3b2bdb8ba36bc23b2267a9c4370fa82 Mon Sep 17 00:00:00 2001 From: Taco de Wolff Date: Sun, 12 May 2024 12:48:26 -0400 Subject: [PATCH] Fix test for Fit --- canvas_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/canvas_test.go b/canvas_test.go index 4a7c73e..e13b63e 100644 --- a/canvas_test.go +++ b/canvas_test.go @@ -46,8 +46,8 @@ func TestCanvas(t *testing.T) { ctx.DrawImage(50.0, 50.0, img, 0.1) // 20x20 => -20x40 c.Fit(6.0) - test.Float(t, c.W, 60.0) // img upper bound - (path lower bound - path half stroke width) + margin - test.Float(t, c.H, 94.0) // path bounds + path stroke width + margin + test.Float(t, c.W, 72.5) // img left bound - path right bound + path stroke width/2 + margin + test.Float(t, c.H, 113) // img top bound - path bottom bound + path stroke width/2 + margin //s := regexp.MustCompile(`base64,.+'`).ReplaceAllString(buf.String(), "base64,'") // remove embedded font //test.String(t, s, `Text`)