Code: Select all
If OpenWindow(0, 0, 0, 220, 220, " this good", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200)
If StartVectorDrawing(CanvasVectorOutput(0))
MovePathCursor(40, 60)
AddPathArc(100, 140, 160, 20, 20)
AddPathArc(160, 20, 220, 180, 20)
AddPathArc(220, 180, 280, 80, 20)
AddPathArc(280, 80, 340, 120, 20)
AddPathLine(340, 120)
VectorSourceColor(RGBA(255, 0, 0, 255))
StrokePath(10)
If StartDrawing(CanvasOutput(0))
DrawingMode(#PB_2DDrawing_Default)
Box(0, 0, 50, 20, $FFFFFF)
Box(50, 0, 50, 20, $000000)
DrawingMode(#PB_2DDrawing_Outlined)
Box(0, 0, 100, 20, RGB(Random(255), Random(255), Random(255)))
StopDrawing()
EndIf
StopVectorDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIfCode: Select all
If OpenWindow(0, 0, 0, 220, 220, "this not good", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200)
If StartDrawing(CanvasOutput(0))
DrawingMode(#PB_2DDrawing_Default)
Box(0, 0, 50, 20, $FFFFFF)
Box(50, 0, 50, 20, $000000)
DrawingMode(#PB_2DDrawing_Outlined)
Box(0, 0, 100, 20, RGB(Random(255), Random(255), Random(255)))
If StartVectorDrawing(CanvasVectorOutput(0))
MovePathCursor(40, 60)
AddPathArc(100, 140, 160, 20, 20)
AddPathArc(160, 20, 220, 180, 20)
AddPathArc(220, 180, 280, 80, 20)
AddPathArc(280, 80, 340, 120, 20)
AddPathLine(340, 120)
VectorSourceColor(RGBA(255, 0, 0, 255))
StrokePath(10)
StopVectorDrawing()
EndIf
StopDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
