Hajime Hoshi

Results 678 comments of Hajime Hoshi

> Should the specified point come from the 'dst' image passed then? Sorry but I don't understand this question. My intention is pass a position separately from the destination image....

Thanks, but the position is still based on the destination image's rectangle, right? What I suggested is to specify a point (or a rectangle) to adjust the text position. I...

For example, the left-bottom goes to the bottom of the target image. It is possible to adjust the position by the skews, but I'm not sure this is the correct...

> I believe what you are describing can accomplish this already using text.Draw() correct?. A little different. text.Draw uses the specified point as the dot position. My suggestion is to...

Yesterday I was thinking about how to match with the existing APIs. The existing APIs are * `func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Color)` *...

> The returned x, y value is some point on the text's rectangle correct? No, these are a new 'dot' position in the destination image rectangle that can be passed...

So, if the font's ascender [1] is 10 pixel and y offset of 'dot' is 1, `AdjustPosition(str, face, text.UpperLeft, 100, 100)` will return 110 and 101. `AdjustDotPosition` might be better...

Thank you for working! I'll take a look later. Just a quick reply: > because I am not exactly sure how I can obtain the ascender `face.Metrics().Ascent`? https://pkg.go.dev/golang.org/x/image/font#Metrics

Thank for the advice, but rather than implementation, the (my) current focus is how to reconcile with the current APIs.

@KalebHawkins > I did make something that I believe emulates what you describes. Yeah, the figures are actually what I wanted. Thank you very much! > I think the only...