Code: Select all
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Can=CanvasGadget(#PB_Any, 0, 0, 400, 200)
If StartVectorDrawing(CanvasVectorOutput(Can))
MovePathCursor(20, 160)
AddPathLine(100, 20)
AddPathLine(180, 160)
ClosePath()
VectorSourceColor(RGBA(255,0,0, 255))
FillPath()
MovePathCursor(220, 160)
AddPathLine(300, 20)
AddPathLine(380, 160)
ClosePath()
VectorSourceColor(RGBA(0, 0, 255, 255))
FillPath()
StopVectorDrawing()
EndIf
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
