AddPathText() wrote:After the call to this function the cursor is moved to the end of the added text.
DrawVectorParagraph() does't not move the cursor either but the documentation does not state that.DrawVectorText() wrote:The cursor will be moved horizontally to the end of the drawn text.
PureBasic 5.62 beta 1 (Linux - x64)
Code: Select all
If OpenWindow(0, 0, 0, 400, 600, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 600)
LoadFont(0, "monospace", 20, #PB_Font_Bold)
If StartVectorDrawing(CanvasVectorOutput(0))
VectorFont(FontID(0), 20)
MovePathCursor(50, 125)
AddPathText("abcdefg")
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
AddPathText("_______")
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
VectorSourceColor(RGBA(0, 0, 0, 100))
FillPath()
MovePathCursor(50, 225)
DrawVectorText("abcdefg")
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
DrawVectorText("_______")
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
MovePathCursor(50, 325)
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
DrawVectorParagraph("abcdefg", 50, 50)
Debug "PathCursor: " + PathCursorX() + ", " + PathCursorY()
DrawVectorParagraph("_______", 50, 50)
StopVectorDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf