Computer Science Canada Text over Graphics |
Author: | mike200015 [ Sat Jan 29, 2005 1:09 pm ] | ||
Post subject: | Text over Graphics | ||
How can i put text over a graphic but so it doesnt cut it off.. heres the code:
I want the question of what colour to go on top of the leaf, but so it doesnt cut it off. And also if anyone knows a way to sort of make this code shorter but still do the same thing. ( the extra variables are for the rest of the program) Thanks! |
Author: | Cervantes [ Sat Jan 29, 2005 1:12 pm ] |
Post subject: | |
Try using fonts. Check the Turing Help File, or search CompSci.ca. |
Author: | person [ Sat Jan 29, 2005 2:18 pm ] |
Post subject: | |
for example : Quote: var font : Font.New ("TimesNewRoman:20") Draw.Text (%ur text,%xcoord,%ycoord,font,%colour) |
Author: | person [ Sat Jan 29, 2005 6:26 pm ] | ||
Post subject: | |||
to th second part of ur question, this does the same thing as having if statements inside if statements
|
Author: | basketball4ever [ Sat Jan 29, 2005 6:46 pm ] | ||||
Post subject: | |||||
person wrote: to th second part of ur question, this does the same thing as having if statements inside if statements
person i dont know what you're talking about... but that doesn't make the code shorter, just more formal and precentable and right ![]() and as for the shorter code
see how i put in a procedure with a parameter pass... so meaning anything thats "col" in the procedure, now turns into watever u want it to be once u put brackets. For example... colourchanging (maplecol) col will then = maple col... not that much shorter but still works btw... person, stop double posting, theres something called edit. It saves alot of space, see how i have btw on the same message?[/code] |
Author: | person [ Sat Jan 29, 2005 7:10 pm ] |
Post subject: | |
Quote: person i dont know what you're talking about... but that doesn't make the code shorter, just more formal and precentable
wat hapens if the first colour is >255, and the second is <255? i know this isnt going to help him, but i just thought that u would like to know EDIT : i was talking about his old source code |
Author: | basketball4ever [ Sat Jan 29, 2005 7:24 pm ] |
Post subject: | |
person wrote: Quote: person i dont know what you're talking about... but that doesn't make the code shorter, just more formal and precentable
wat hapens if the first colour is >255, and the second is <255? i know this isnt going to help him, but i just thought that u would like to know doesn't matter its just that IF col >255 then col := 255 so meaning if u substitute it the first variable wont affect the 2nd.. its different due to parameter pass. |
Author: | mike200015 [ Sat Jan 29, 2005 9:10 pm ] |
Post subject: | |
thanx for answerin ma question.. and wats the difference between proc and procedure, or is it the same ? |
Author: | basketball4ever [ Sat Jan 29, 2005 9:13 pm ] |
Post subject: | |
mike200015 wrote: thanx for answerin ma question.. and wats the difference between proc and procedure, or is it the same ?
nope, its the same, just less typing ![]() ![]() |
Author: | mike200015 [ Sat Jan 29, 2005 11:59 pm ] |
Post subject: | |
wat other short cut kinda stuff r thr.. is thr like a list of different 1s by any chance any where? |
Author: | Cervantes [ Sun Jan 30, 2005 10:15 am ] |
Post subject: | |
Yes. |
Author: | basketball4ever [ Sun Jan 30, 2005 1:37 pm ] |
Post subject: | |
yup theres alot and learning arrays is probably the biggest one shortcuts include: http://www.compsci.ca/v2/viewtopic.php?t=4588... go there... lots and lots of shortcuts that are good. ![]() |
Author: | mike200015 [ Sun Jan 30, 2005 2:48 pm ] |
Post subject: | |
hey thanx very much. both of those links helped me alot, i never knew thr was shortcuts like that |