Code: Select all
LoadFont(0, "Arial", 12)
LoadFont(1, "Times New Roman", 12, #PB_Font_Italic)
LoadFont(2, "Georgia", 12,#PB_Font_StrikeOut)
If OpenWindow(0, 0, 0, 600, 100, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 600, 100)
If StartVectorDrawing(CanvasVectorOutput(0))
VectorFont(FontID(0), 50)
hb1 = VectorTextHeight("Hi",#PB_VectorText_Baseline)
VectorSourceColor(RGBA(0, 255, 255, 255))
MovePathCursor(10 ,10)
DrawVectorText("Hi")
x = PathCursorX()
VectorFont(FontID(1), 12)
VectorSourceColor(RGBA(255, 0, 0, 255))
hb2 = VectorTextHeight("from PB",#PB_VectorText_Baseline)
MovePathCursor(x+4 ,10 + hb1 - hb2)
DrawVectorText("from PB")
x = PathCursorX()
VectorFont(FontID(2), 30)
VectorSourceColor(RGBA(0, 0, 255, 255))
hb3 = VectorTextHeight("ShadowStorm",#PB_VectorText_Baseline)
MovePathCursor(x+4,10 + hb1 - hb3)
DrawVectorText("ShadowStorm")
StopVectorDrawing()
FreeFont(0)
FreeFont(1)
FreeFont(2)
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf