From 33da481d60ace8c80557f8748886d45dcf3b300b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 13 Aug 2022 00:28:30 +0900 Subject: [PATCH] text: refactoring Updates #1992 --- text/text.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/text/text.go b/text/text.go index c8af72601..b85da38c1 100644 --- a/text/text.go +++ b/text/text.go @@ -311,10 +311,10 @@ func BoundString(face font.Face, text string) image.Rectangle { } return image.Rect( - int(math.Floor(fixed26_6ToFloat64(bounds.Min.X))), - int(math.Floor(fixed26_6ToFloat64(bounds.Min.Y))), - int(math.Ceil(fixed26_6ToFloat64(bounds.Max.X))), - int(math.Ceil(fixed26_6ToFloat64(bounds.Max.Y))), + bounds.Min.X.Floor(), + bounds.Min.Y.Floor(), + bounds.Max.X.Ceil(), + bounds.Max.Y.Ceil(), ) }