MovePathCursor()
Syntaxe
MovePathCursor(X.d, Y.d [, Options])Description
Déplace le curseur du chemin de dessin vectoriel vers un nouvel emplacement.
Arguments
X.d, Y.d La nouvelle position du curseur dans le chemin. Options (optionnel) Peut prendre l'une des valeurs suivantes: #PB_Path_Default : Position absolue (par défaut) #PB_Path_Relative: Position relative à la dernière position.
Valeur de retour
Aucune.
Remarques
En plus du déplacement du curseur, cette fonction commence aussi une nouvelle figure dans le chemin, ce qui signifie qu'un appel à ClosePath() va dessiner une ligne en arrière à cet endroit.
Exemple
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) CanvasGadget(0, 0, 0, 400, 200) If StartVectorDrawing(CanvasVectorOutput(0)) MovePathCursor(40, 40) For i = 1 To 4 AddPathLine(80, 0, #PB_Path_Relative) MovePathCursor(0, 40, #PB_Path_Relative) Next i VectorSourceColor(RGBA(255, 0, 0, 255)) StrokePath(10) StopVectorDrawing() EndIf Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow EndIf
Voir aussi
ClosePath(), AddPathLine(), FillPath(), StrokePath()
OS Supportés
Tous