Peter
Code: Alles auswählen
EnableExplicit
Define c.i
If OpenWindow(1, #PB_Ignore, #PB_Ignore, 400, 300, "VectorDrawing", #PB_Window_SystemMenu)
CanvasGadget(2, 0, 0, 400, 300)
If StartVectorDrawing(CanvasVectorOutput(2, #PB_Unit_Pixel))
; Linie oben für Kontrolle.
MovePathCursor(30, 50.5)
AddPathLine(370, 50.5)
VectorSourceColor($FF999999)
StrokePath(1, #PB_Path_Default)
; Zickzack-Linie links.
MovePathCursor(50, 50)
For c = 55 To 200 Step 5
If (c % 2)
AddPathLine(c, 250)
Else
AddPathLine(c, 50)
EndIf
Next c
VectorSourceColor($FF000000)
StrokePath(1, #PB_Path_Default)
; Zickzack-Linie rechts.
MovePathCursor(200, 50)
For c = 205 To 350 Step 5
If (c % 2)
AddPathLine(c, 250)
Else
AddPathLine(c, 50)
EndIf
Next c
VectorSourceColor($FF000000)
; StrokePath - bis 1.5 keine Änderung, ab 1.6 dickere Linie, aber falsche Längen!
StrokePath(2, #PB_Path_Default)
;DotPath(2, 10)
StopVectorDrawing()
EndIf
Repeat : Until (#PB_Event_CloseWindow = WaitWindowEvent())
EndIf