Code: Select all
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 200)
LoadFont(0, "Impact", 20, #PB_Font_Bold)
If StartVectorDrawing(CanvasVectorOutput(0))
ResizeGadget(0,0,0,500,300) ; <--- this will crash on macOS on the next draw, but doesn't crash windows
VectorFont(FontID(0), 25)
VectorSourceColor(RGBA(0, 0, 0, 80))
Text$ = "The quick brown fox jumps over the lazy dog"
For i = 1 To 6
MovePathCursor(200 - VectorTextWidth(Text$)/2, 100 - VectorTextHeight(Text$)/2)
DrawVectorText(Text$)
RotateCoordinates(200, 100, 30)
Next i
StopVectorDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Windows seems to work fine, but macOS doesn't like it can crashes with a memory error on the next draw after the resize.