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

Username:   Password: 
 RegisterRegister   
 increase font size help !!!!!!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
WooFerPPK




PostPosted: Mon Nov 18, 2002 8:30 pm   Post subject: increase font size help !!!!!!!

code:

for decreasing count : 60 .. 1
    fontselect := "Freestyle Script:" + intstr (count)
    font1 := Font.New (fontselect)

    move := move + 1
    text := "TENNIS TEAM" (1 .. 11)

    Draw.Text (text, maxx div 2 - 87, maxy div 2 - 25, font1, 12)
    delay (10)

    Draw.Text (text, maxx div 2 - 87, maxy div 2 - 25, font1, green)
    Font.Free (font1)
end for


that will make the font shrink from the positon its in
i want it to shrink each letter at a time
ie/ HELL0

pls help
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Nov 19, 2002 1:00 am   Post subject: (No subject)

so then you first declear all the fonts (from 1 to size of string) then run a for loop as this:

code:
for i=1 to length(text)
font.draw(text(i),X,Y,fontid(i),color)
end for


as the for loop increases, the fontid changes (make sure fonts are in an array)

also a good estimate of the position of X is number of letters * fontsize... So since its gonna be changing, I recomend counter... as

code:
X:= X + (length(text)-i) + (note here)


in note here part you put w/e value you'd have to add to length of the text to get largest font size. This is assuming that fonts decrease by 1.

length(text) - i
gives size of the font and
note here
part gives the base size increasement... well it depends on how you declear your fonts.

Hope you understand
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: