Overlapping line segments are wiped out (similar to overlapping areas of filled paths when #PB_Path_Winding is not used). So a flag for StrokePath to eliminate this effect for lines would be helpful.
Code: Select all
OpenWindow(0, 0, 0, 1400, 500, "Swiss Cheese", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 1400, 500)
StartVectorDrawing(CanvasVectorOutput(0))
If Date()&1
; Draws circles and boxes with different line widths...
For j=1 To 8
n=j*10
MovePathCursor(j*(n+75)+j*40-40,180)
AddPathCircle(0,-50,40,0,0,#PB_Path_Relative)
AddPathBox(-60,220,40,40,#PB_Path_Relative)
VectorSourceColor($FF0000FF)
StrokePath(j*20,#PB_Path_RoundCorner)
Next
Else
; Draws the same path with a wider and a narrower brush...
j=10
MovePathCursor(150,100)
AddPathArc(200,100,150,150,20)
AddPathArc(100,200,150,250,20)
AddPathArc(200,250,150,150,20)
AddPathArc(100,150,150,100,20)
ClosePath(); removing ClosePath() does show the lines correctly...
While j>0
VectorSourceColor($40FF0000+j*25)
StrokePath(j*20,#PB_Path_RoundCorner|#PB_Path_Preserve|#PB_Path_RoundEnd)
j-1-Bool(j=7)*5
Wend
EndIf
StopVectorDrawing()
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow