how to rotate text in a image with DrawText()?
Posted: Tue Mar 28, 2017 9:40 pm
Hey all,
I wondered how can i rotate text with DrawText()?
I wondered how can i rotate text with DrawText()?
- a basic to master the web -
https://forums.spiderbasic.com/
Code: Select all
OpenWindow(0, 0, 0, 800,600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0,0,0,800,600)
LoadFont(0, "arial", 20)
StartVectorDrawing(CanvasVectorOutput(0))
VectorFont(FontID(0), 50)
t.s="Hello world"
tw=VectorTextWidth(t)/2
th=VectorTextHeight(t)/2
For i=0 To 180-1 Step 20
RotateCoordinates(400,300,20)
MovePathCursor(400-tw,300-th)
VectorSourceColor($44000000)
DrawVectorText(t)
StrokePath(1)
Next
StopVectorDrawing()