AddPathText() and DrawVectorText() don't move cursor

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

#NULL
Addict
Addict
Posts: 1499
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

AddPathText() and DrawVectorText() don't move cursor

Post by #NULL »

the documentation says AddPathText() and DrawVectorText() move the cursor but they don't.
AddPathText() wrote:After the call to this function the cursor is moved to the end of the added text.
DrawVectorText() wrote:The cursor will be moved horizontally to the end of the drawn text.
DrawVectorParagraph() does't not move the cursor either but the documentation does not state that.

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
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: AddPathText() and DrawVectorText() don't move cursor

Post by Andre »

Need to be checked by Fred/freak, if this is intended behaviour (and the Docs need to be adapted) or if there is a bug / missing functionality at the PB commands...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply