Fixed TypeSetter.AtPosition
This commit is contained in:
@@ -155,6 +155,17 @@ func DoLine (text []rune, face font.Face, wrap bool, maxWidth fixed.Int26_6) (li
|
||||
return
|
||||
}
|
||||
|
||||
// Length returns the amount of runes within the line, including the trailing
|
||||
// line break if it exists.
|
||||
func (line *LineLayout) Length () int {
|
||||
lineSize := 0
|
||||
for _, word := range line.Words {
|
||||
lineSize += len(word.Runes)
|
||||
}
|
||||
if line.BreakAfter { lineSize ++ }
|
||||
return lineSize
|
||||
}
|
||||
|
||||
// Align aligns the text in the line according to the specified alignment
|
||||
// method.
|
||||
func (line *LineLayout) Align (align Align) {
|
||||
|
||||
Reference in New Issue
Block a user