Page 1 of 1

how to rotate text in a image with DrawText()?

Posted: Tue Mar 28, 2017 9:40 pm
by T4r4ntul4
Hey all,

I wondered how can i rotate text with DrawText()?

Re: how to rotate text in a image with DrawText()?

Posted: Wed Mar 29, 2017 7:07 am
by tj1010
DrawText() to sprite output then rotate sprite.

Re: how to rotate text in a image with DrawText()?

Posted: Wed Mar 29, 2017 9:10 am
by T4r4ntul4
how to get the sprite back on the image?

Re: how to rotate text in a image with DrawText()?

Posted: Thu Mar 30, 2017 1:43 pm
by tj1010
You're right there is no way to get a bitmap from a screen or sprite without inline JS.

You probably have to do this with inline JS->CSS3 right now. I beleive CSS3 has a way to rotate things.

Re: how to rotate text in a image with DrawText()?

Posted: Fri Mar 31, 2017 7:46 am
by pf shadoko
you can use the VectorDrawing lib :

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()

Re: how to rotate text in a image with DrawText()?

Posted: Fri Mar 31, 2017 8:25 am
by tj1010
lol I didn't even know there was a text function in vector lib. I never used it.