Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 3d Text positioning
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
air_force91




PostPosted: Wed Jan 07, 2004 5:27 pm   Post subject: 3d Text positioning

i know how to make a 3d text effect...but how do i postion the text on the screen like this: Welcome
To
My Page!
Sponsor
Sponsor
Sponsor
sponsor
Thuged_Out_G




PostPosted: Wed Jan 07, 2004 6:10 pm   Post subject: (No subject)

you can use Font.Draw to position text...or an easier way

locate(x,y)
shorthair




PostPosted: Wed Jan 07, 2004 6:23 pm   Post subject: (No subject)

i dont belive that will work for 3d font
Homer_simpson




PostPosted: Wed Jan 07, 2004 8:42 pm   Post subject: Re: 3d Text positioning

air_force91 wrote:
i know how to make a 3d text effect...but how do i postion the text on the screen like this: Welcome
To
My Page!

how do u make 3d text effect?
air_force91




PostPosted: Thu Jan 08, 2004 7:38 am   Post subject: well...i got the 3D effect from another page in this forum..

code:
var size : int
var text : string
put "enter text"
get text:*
put "enter size"
get size

var fontID : array..size of int

for i:size div 2..size
fontID(i) :=Font.New("Arial:"+intstr(i))
end for

procedure Text3D(text:string)

for t:i..length(text)

for i:size div 2..size
Font.Draw(text(t), t*size, 100, fontID(i), 20+floor
(i/size*10))
end for

end Text3D

Text3D(text)


do any of u have a much smaller code for 3D text?

and im not sure if the locate command does work with 3D...ive tried it b4...
air_force91




PostPosted: Thu Jan 08, 2004 7:49 am   Post subject: positioning the text

yo...can u tell me how i can insert Font.Draw in my code to match the way i want the text to appear...i already have one Font.Draw in my code...
Tony




PostPosted: Thu Jan 08, 2004 10:42 am   Post subject: (No subject)

you should give credit when quoting code like that... I think I wrote that Confused

anyways... in the line
code:

Font.Draw(text(t), t*size, 100, fontID(i), 20+floor
(i/size*10))


t*size is the X positin
100 is the Y

to change the location of the string you just add a number to those values.

If you're trying to display the text on 3 lines, you'd have to run the code 3 times, once for each line
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
air_force91




PostPosted: Thu Jan 08, 2004 9:02 pm   Post subject: sorry...

sorry...i found the code long time ago...so didn't look up the source...but the code is really helpful...thanx...thanx a lot...teacher's giving only 5 days to complete programming an interfacing game Sad...but it really helps... 8)
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: