setrotate with drawtext

BlitzMax Forums/BlitzMax Beginners Area/setrotate with drawtext

Panno(Posted 2005) [#1]
HI,

how i can use a other rotatingpoint (PIVOT) as use this

setrotate xx
drawtext "text",100,100

this will only rotate on the left/up point
?


flying willy(Posted 2005) [#2]
Hi panno

you need to use the image handle commands to set the "pivot".


RiK(Posted 2005) [#3]
Panno, if you want to find the exact centre of your text string, use TextWidth & TextHeight:

Off the top of my head....

w = TextWidth("TESTY!")/2
h = TextHeight("TESTY!")/2

SetHandle w,h
SetRotation r
DrawText "TESTY!",320,240



Panno(Posted 2005) [#4]
thx skunk and rik ! i will test

mfg panno


tonyg(Posted 2005) [#5]
You might want to check the spintext sample.


bradford6(Posted 2005) [#6]
Graphics 640,480,0
repeat
	Cls
	ang:+1
	SetRotation ang
	text$ = "A Spinning String of TEXT"
	SetHandle(TextWidth(text$)/2,TextHeight(text$)/2)
	DrawText text$,MouseX(),MouseY()
	Flip
Until KeyHit(KEY_ESCAPE)