AddPathLine()

Syntaxe

AddPathLine(X.d, Y.d [, Options])
Description
Ajoute une ligne droite sur le chemin de dessin vectoriel, de la position actuelle du curseur aux coordonnées données.

Arguments

X.d, Y.d La position de l'extrémité de la ligne.

Devient la nouvelle position du curseur.
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.

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, 20)
      For i = 1 To 4
        AddPathLine(80, 0, #PB_Path_Relative)
        AddPathLine(0, 40, #PB_Path_Relative)
      Next i
      
      VectorSourceColor(RGBA(255, 0, 0, 255))
      StrokePath(10, #PB_Path_RoundCorner)
    
      StopVectorDrawing()
    EndIf
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  EndIf

Voir aussi

MovePathCursor(), ClosePath(), AddPathArc(), AddPathCurve(), AddPathCircle(), AddPathEllipse(), AddPathBox()

OS Supportés

Tous

<- AddPathEllipse() - VectorDrawing Index - AddPathSegments() ->