Code: Select all
If OpenWindow(0, 0, 0, 520, 520, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(0, 1234)
;CanvasGadget(0, 10, 10, 500, 500, #PB_Canvas_Container)
ImageGadget(1, 100, 100, 300, 300, 0)
;CloseGadgetList()
CreateImage(0, 300, 300, 32, #PB_Image_Transparent)
LoadFont(0, "Times New Roman", 20)
If StartVectorDrawing(ImageVectorOutput(0))
Text$ = "Every drawing output has a default unit of measurement. The default unit is pixels " +
"for screen or raster image outputs and points for printer or vector image outputs. " +
"It is however possible to select a different unit of measurement for the output when " +
"creating it with the ImageVectorOutput(), PrinterVectorOutput() or similar function."
VectorFont(FontID(0), 18)
MovePathCursor(0, 0)
DrawVectorParagraph(Text$, 300, 300)
StopVectorDrawing()
EndIf
SetGadgetState(1, ImageID(0))
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf