The transparent background is light blue with the constant ‘#PB_Image_Transparent’.
Peter
Code: Select all
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 200)
CreateImage(1, 400, 200, 32, #PB_Image_Transparent) ; Light blue background!
;CreateImage(1, 400, 200, 32, #PB_Image_TransparentBlack) ; OK
If StartVectorDrawing(ImageVectorOutput(1))
; partial circle
AddPathCircle(100, 100, 75, 0, 235)
; partial circle with lines to the center
MovePathCursor(300, 100)
AddPathCircle(300, 100, 75, 0, 235, #PB_Path_Connected)
ClosePath()
VectorSourceColor(RGBA(255, 0, 0, 255))
StrokePath(10)
StopVectorDrawing()
EndIf
SetGadgetAttribute(0, #PB_Canvas_Image, ImageID(1))
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf