En faite je veux rendre plus simple l'utilisation des vecteur.
Quand tu dessine une ligne ou autre, pleins de calcule ne sont pas fait.
Code : Tout sélectionner
#SV_TypeLine = 1   ; Ligne
#SV_TypeDash = 2   ; Tirets
#SV_TypeDot = 3    ; Points
#SV_StyleDefaut = #PB_Path_Default                 ; Pas de comportement spécial (Par défaut).
#SV_StyleRoundEnd = #PB_Path_RoundEnd              ; Trace la ligne avec des extrémités arrondies.
#SV_StyleSquareEnd = #PB_Path_SquareEnd            ; Trace la ligne avec un carré aux extrémités.
#SV_StyleRoundCorner = #PB_Path_RoundCorner        ; Trace la ligne avec des coins arrondis.
#SV_StyleDiagonalCorner = #PB_Path_DiagonalCorner  ; Trace la ligne avec les coins coupés en diagonal.
;{ Draw a line at the indicated position and of the desired size.
; VectorImage.i = Image.
; X1.d = Start X position.
; Y1.d = Starting Y position.
; X2.d = End X position.
; Y2.d = End X position.
; Color.q = Line color.
; Thickness.d = Thickness of the line, the position of the patterns will be automatically centered on this line in relation To their Width (Length.d) If the type chosen is #SV_TypeDash Or #SV_TypeDoth.
; 
; Type: #SV_TypeLine : Draws a continuous line.
; #SV_TypeDash: Draws a discontinuous line with Dashes.
; #SV_TypeDot: Draws a discontinuous line with Dots.
; 
; Style: #SV_StyleRoundEnd: Draws a line With rounded ends.
; #SV_StyleSquareEnd: Draws the line with a square at the ends.
;
; Length: Length (If Style <> #SV_StyleDefault) Or Width (If Style = #SV_StyleDefault) of the Pattern Traits (Square, Round) If Type = #SV_TypeDash Or #SV_TypeDot, otherwise no effect.
; Distance: Distance between patterns (Square, Round) If Type = #SV_TypeDash Or #SV_TypeDot, otherwise no effect.
;
; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; 
; Trace une ligne à la position indiqué et de la taille désiré.
; VectorImage.i = Image.
; X1.d = Position X de départ.
; Y1.d = Position Y de départ.
; X2.d = Position X de fin.
; Y2.d = Position X de fin.
; Color.q = Couleur de la ligne.
; Thickness.d = Epaisseur de la ligne, la position des motifs sera automatiquement centré sur cette ligne par apport à leur Largeur (Length.d) si le type choisie est #SV_TypeDash ou #SV_TypeDoth.
; 
; Type: #SV_TypeLine              : Trace une ligne continue.
;       #SV_TypeDash              : Trace une ligne discontinue avec des Tirets.
;       #SV_TypeDot               : Trace une ligne discontinue avec des Points.
; 
; Style: #SV_StyleRoundEnd        : Trace la ligne avec des extrémités arrondies.
;        #SV_StyleSquareEnd       : Trace la ligne avec un carré aux extrémités.
;
; Length: Longueur (Si Style <> #SV_StyleDefaut) ou Largeur (Si Style = #SV_StyleDefaut) des Traits des motifs (Carré, Rond) si Type = #SV_TypeDash ou #SV_TypeDot, sinon pas d'effet.
; Distance: Distance entre les motifs (Carré, Rond) si Type = #SV_TypeDash ou #SV_TypeDot, sinon pas d'effet.
;}
Procedure.b SimplyVector_DrawLine(X1.d, Y1.d, X2.d, Y2.d, Color.q = 18446744073692774400, Thickness.d = 1, Type.i = #SV_TypeLine, Style.i = #SV_StyleSquareEnd, Length.d = 10, Distance.d = 10)
  
  If Type.i = #SV_TypeLine
    
    Select Style.i
        
      Case #SV_StyleSquareEnd, #SV_StyleRoundEnd
        
        If Y1.d = Y2.d
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d + (Thickness.d / 2))
        ElseIf X1.d = X2.d
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d)
        ElseIf X1.d < X2.d And Y1.d < Y2.d
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d + (Thickness.d / 8))
        ElseIf X1.d > X2.d And Y1.d > Y2.d
          MovePathCursor(X1.d - (Thickness.d / 2), Y1.d - (Thickness.d / 8))
        ElseIf X1.d < X2.d And Y1.d > Y2.d
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d - (Thickness.d / 8))
        ElseIf X1.d > X2.d And Y1.d < Y2.d
          MovePathCursor(X1.d - (Thickness.d / 2), Y1.d + (Thickness.d / 8))
        Else
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d)
        EndIf
        
      Default
        
        If Y1.d = Y2.d
          MovePathCursor(X1.d, Y1.d + (Thickness.d / 2))
        ElseIf X1.d = X2.d
          MovePathCursor(X1.d + (Thickness.d / 2), Y1.d)
        Else
          MovePathCursor(X1.d, Y1.d)
        EndIf
        
    EndSelect
    
  Else
    
    Select Style.i
        
      Case #SV_StyleSquareEnd, #SV_StyleRoundEnd
        
        If Y1.d = Y2.d
          MovePathCursor(X1.d + (Length.d / 2), Y1.d + (Length.d / 2))
        ElseIf X1.d = X2.d
          MovePathCursor(X1.d + (Length.d / 2), Y1.d)
        ElseIf X1.d < X2.d And Y1.d < Y2.d
          MovePathCursor(X1.d + (Length.d / 2), Y1.d + (Length.d / 8))
        ElseIf X1.d > X2.d And Y1.d > Y2.d
          MovePathCursor(X1.d - (Length.d / 2), Y1.d - (Length.d / 8))
        ElseIf X1.d < X2.d And Y1.d > Y2.d
          MovePathCursor(X1.d + (Length.d / 2), Y1.d - (Length.d / 8))
        ElseIf X1.d > X2.d And Y1.d < Y2.d
          MovePathCursor(X1.d - (Length.d / 2), Y1.d + (Length.d / 8))
        Else
          MovePathCursor(X1.d + (Length.d / 2), Y1.d)
        EndIf
        
      Default
        
        If Y1.d = Y2.d
          MovePathCursor(X1.d, Y1.d + (Length.d / 2))
        ElseIf X1.d = X2.d
          MovePathCursor(X1.d + (Length.d / 2), Y1.d)
        Else
          MovePathCursor(X1.d, Y1.d)
        EndIf
        
    EndSelect
    
  EndIf
  
  If Type.i = #SV_TypeLine
    
    Select Style.i
        
      Case #SV_StyleSquareEnd, #SV_StyleRoundEnd
        
        If Y1.d = Y2.d
          AddPathLine(X1.d + (X2.d - X1.d) - (Thickness.d / 2), Y2.d + (Thickness.d / 2))
        ElseIf X1.d = X2.d
          AddPathLine(X1.d + (X2.d - X1.d) + (Thickness.d / 2), Y2.d)
        ElseIf X1.d < X2.d And Y1.d < Y2.d
          AddPathLine(X2.d - (Thickness.d / 2), Y2.d - (Thickness.d / 8))
        ElseIf X1.d > X2.d And Y1.d > Y2.d
          AddPathLine(X2.d + (Thickness.d / 2), Y2.d + (Thickness.d / 8))
        ElseIf X1.d < X2.d And Y1.d > Y2.d
          AddPathLine(X2.d - (Thickness.d / 2), Y2.d + (Thickness.d / 8))
        ElseIf X1.d > X2.d And Y1.d < Y2.d
          AddPathLine(X2.d + (Thickness.d / 2), Y2.d - (Thickness.d / 8))
        Else
          AddPathLine(X2.d - (Thickness.d / 2), Y2.d)
        EndIf
        
      Default
        
        If Y1.d = Y2.d
          AddPathLine(X1.d + (X2.d - X1.d), Y2.d + (Thickness.d / 2))
        ElseIf X1.d = X2.d
          AddPathLine(X1.d + (X2.d - X1.d) + (Thickness.d / 2), Y2.d)
        Else
          AddPathLine(X2.d, Y2.d)
        EndIf
        
    EndSelect
    
  Else
    
    Select Style.i
        
      Case #SV_StyleSquareEnd, #SV_StyleRoundEnd
        
        If Y1.d = Y2.d
          AddPathLine(X1.d + (X2.d - X1.d) - (Length.d / 2), Y2.d + (Length.d / 2))
        ElseIf X1.d = X2.d
          AddPathLine(X1.d + (X2.d - X1.d) + (Length.d / 2), Y2.d)
        ElseIf X1.d < X2.d And Y1.d < Y2.d
          AddPathLine(X2.d - (Length.d / 2), Y2.d - (Length.d / 8))
        ElseIf X1.d > X2.d And Y1.d > Y2.d
          AddPathLine(X2.d + (Length.d / 2), Y2.d + (Length.d / 8))
        ElseIf X1.d < X2.d And Y1.d > Y2.d
          AddPathLine(X2.d - (Length.d / 2), Y2.d + (Length.d / 8))
        ElseIf X1.d > X2.d And Y1.d < Y2.d
          AddPathLine(X2.d + (Length.d / 2), Y2.d - (Length.d / 8))
        Else
          AddPathLine(X2.d - (Length.d / 2), Y2.d)
        EndIf
        
      Default
        
        If Y1.d = Y2.d
          AddPathLine(X1.d + (X2.d - X1.d), Y2.d + (Length.d / 2))
        ElseIf X1.d = X2.d
          AddPathLine(X1.d + (X2.d - X1.d) + (Length.d / 2), Y2.d)
        Else
          AddPathLine(X2.d, Y2.d)
        EndIf
        
    EndSelect
    
  EndIf
  
  VectorSourceColor(Color.q)
  
  Select Type.i
      
    Case #SV_TypeLine ; 1
      StrokePath(Thickness.d, Style.i)
      
    Case #SV_TypeDash ; 2
      DashPath(Length.d, Distance.d, Style.i)
      
    Case #SV_TypeDot ; 3
      DotPath(Length.d, Distance.d, Style.i)
      
    Default ; 1
      StrokePath(Thickness.d, Style.i)
      
  EndSelect
  
  ProcedureReturn 1
  
EndProcedure
If OpenWindow(0, 0, 0, 800, 600, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  CanvasGadget(0, 0, 0, 800, 600)
  
  If StartVectorDrawing(CanvasVectorOutput(0))
    
    BoxX.d = 50.5
    BoxY.d = 25.5
    BoxWidth.d = 201
    BoxHeight.d = 50
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleDefaut, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleSquareEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleRoundEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleDefaut, 10, 2)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleDefaut, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 25
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleDefaut, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleSquareEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleRoundEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleDefaut, 10, 2)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleDefaut, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5 + BoxHeight.d
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 25
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleDefaut, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleSquareEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeLine, #SV_StyleRoundEnd, 10, 12)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleDefaut, 10, 2)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDash, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    BoxX.d = 50.5
    BoxY.d + BoxHeight.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleDefaut, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleSquareEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    BoxX.d + BoxWidth.d + 5
    
    AddPathBox(BoxX.d, BoxY.d, BoxWidth.d, BoxHeight.d)
    VectorSourceColor(RGBA(0, 0, 0, 255))
    StrokePath(1)
    
    LineX1.d = BoxX.d + 0.5
    LineY1.d = BoxY.d + 0.5 + BoxHeight.d
    
    LineX2.d = LineX1.d + BoxWidth.d - 1
    LineY2.d = BoxY.d + 0.5
    
    Thickness.d = 10
    
    SimplyVector_DrawLine(LineX1.d, LineY1.d, LineX2.d, LineY2.d, RGBA(255, 0, 0, 255), Thickness.d, #SV_TypeDot, #SV_StyleRoundEnd, 10, 11)
    
    ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    StopVectorDrawing()
    
  EndIf
  
  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf