widget: update textIterator docs for accuracy

The previous docs claimed that failing to set a textMaterial would result in
invisible glyphs when in reality it results in using whatever the current paint
material is. This could be the paint material from before laying out the glyphs,
or it could be the material for a bitmap glyph. As such, it's better to say that
the color is undefined.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2023-04-26 09:24:43 -04:00
committed by Elias Naur
parent bba91263b0
commit 816bda7ac7
+2 -1
View File
@@ -84,7 +84,8 @@ type textIterator struct {
// maxLines is the maximum number of text lines that should be displayed.
maxLines int
// material sets the paint material for the text glyphs. If none is provided
// the glyphs will be invisible.
// the color of the glyphs is undefined and may change unpredictably if the
// text contains color glyphs.
material op.CallOp
// linesSeen tracks the quantity of line endings this iterator has seen.