Freak gave the answer.
M.Only single-line text is supported everywhere. If it works on some OS you cannot rely on it because this may change in the future.
M.Only single-line text is supported everywhere. If it works on some OS you cannot rely on it because this may change in the future.
byRemarks
This function draws single lines of text only. Multiple calls must be made to draw multiple lines. Use VectorTextWidth() and VectorTextHeight() to determine the dimensions of the text to draw in order to properly align the text with other content.
The DrawVectorParagraph() function can be used to draw a larger block of text with automatic layout such as line breaks. This function is more suited for drawing multiline text.
I think it's redundant but is that what you want?Remarks
This function draws single lines of text only. Multiple calls must be made to draw multiple lines because line feed (#LF$, chr(10)) and carriage return (#CR$, chr(13)) will not be taken into account.
The DrawVectorParagraph() function can be used to draw a larger block of text with automatic layout such as line breaks. This function is more suited for drawing multiline text.
Code: Select all
EnableExplicit
; Windows
Define font_ID=LoadFont(#PB_Any, "", 11)
Define image_ID=CreateImage(#PB_Any, 16, 16)
Define text$="aaa"+#LF$+"bbbb"+#LF$+"ccccc"+#LF$+"dddddd"+#LF$+"eeeeeee"
text$+text$+text$+text$+text$+text$+text$+text$+text$+text$
StartVectorDrawing(ImageVectorOutput(image_ID))
VectorFont(FontID(font_ID))
Debug "Text width "+VectorTextWidth(text$)
Debug "Text height false "+Str(VectorTextHeight(text$)*CountString(text$, #LF$)+1)
Debug "Text height ok "+Str(VectorTextHeight(" ")*CountString(text$, #LF$)+1)
StopVectorDrawing()