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

Username:   Password: 
 RegisterRegister   
 Font Effect
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
congcong




PostPosted: Sat May 22, 2004 12:18 pm   Post subject: Font Effect

the code is too mass

Quote:
var WinMain := Window.Open ("position:center;center,graphics:500;30")

var font : int
font := Font.New ("courier:25:bold")

var ch : string
put "Enter a string:" ..
get ch : *
cls
Font.Draw (ch, 10, 10, font, black)

type Cor :
record
x : array 1 .. 10000 of int
y : array 1 .. 10000 of int
cl : array 1 .. 10000 of int
end record

var cor : Cor
var count := 1


for i : 2 .. maxx
for g : 2 .. maxy
if (whatdotcolor (i, g) not= whatdotcolor (i - 1, g)) or (whatdotcolor (i, g) not= whatdotcolor (i, g + 1)) then
cor.x (count) := i
cor.y (count) := g
cor.cl (count) := whatdotcolor (i, g)
count := count + 1
end if
end for
end for

var count2 := 1

for i : 2 .. maxx
for g : 2 .. maxy
if i = cor.x (count2) and g = cor.y (count2) then
drawdot (i, g, 29)
count2 := count2 + 1
exit when count2 > count - 2
end if
end for
end for
delay(1000)
count := 1

for i : 2 .. maxx
for g : 2 .. maxy
if (whatdotcolor (i, g) not= whatdotcolor (i - 1, g) and whatdotcolor (i, g)=29) or (whatdotcolor (i, g) not= whatdotcolor (i, g + 1)and whatdotcolor (i, g)=29) then
cor.x (count) := i
cor.y (count) := g
cor.cl (count) := whatdotcolor (i, g)
count := count + 1
end if
end for
end for

count2 := 1

for i : 2 .. maxx
for g : 2 .. maxy
if i = cor.x (count2) and g = cor.y (count2) then
drawdot (i-1, g,31)
count2 := count2 + 1
exit when count2 > count - 2
end if
end for
end for


delay(1000)
count := 1

for i : 2 .. maxx
for g : 2 .. maxy
if (whatdotcolor (i, g) not= whatdotcolor (i - 1, g) and whatdotcolor (i, g)=29) or (whatdotcolor (i, g) not= whatdotcolor (i, g + 1)and whatdotcolor (i, g)=29) then
cor.x (count) := i
cor.y (count) := g
cor.cl (count) := whatdotcolor (i, g)
count := count + 1
end if
end for
end for

count2 := 1

for i : 2 .. maxx
for g : 2 .. maxy
if i = cor.x (count2) and g = cor.y (count2) then
drawdot (i+1, g,27)
count2 := count2 + 1
exit when count2 > count - 2
end if
end for
end for
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Sat May 22, 2004 3:31 pm   Post subject: (No subject)

hey, nice enough. +15 bits
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: