freetype icon indicating copy to clipboard operation
freetype copied to clipboard

About the `done` input parameter of `Paint` functions

Open Megidd opened this issue 7 months ago • 3 comments

I investigated the done input parameter of func (r *RGBAPainter) Paint(ss []Span, done bool) {} here:

https://github.com/golang/freetype/blob/e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4/raster/paint.go#L127

My debugger indicates that the done input parameter passed to the function is true multiple times. It is not what I expected. I expected that it should be true once and only for the last span to be drawn. I mean, it should indicate whether the drawing is done. Right?

Why is the done parameter not behaving as I assumed? Am I missing something about it? Thanks.

Megidd avatar Apr 14 '25 05:04 Megidd