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

Just starting out? Need help? Post your questions and find answers here.
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

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

Post by T4r4ntul4 »

Hey all,

I wondered how can i rotate text with DrawText()?
tj1010
Posts: 201
Joined: Wed May 27, 2015 1:36 pm
Contact:

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

Post by tj1010 »

DrawText() to sprite output then rotate sprite.
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

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

Post by T4r4ntul4 »

how to get the sprite back on the image?
tj1010
Posts: 201
Joined: Wed May 27, 2015 1:36 pm
Contact:

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

Post 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.
pf shadoko
Posts: 74
Joined: Thu May 26, 2016 11:09 am

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

Post 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()
tj1010
Posts: 201
Joined: Wed May 27, 2015 1:36 pm
Contact:

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

Post by tj1010 »

lol I didn't even know there was a text function in vector lib. I never used it.
Post Reply