Strict Graphics 640,480 '----------LOAD FONT Local url:String="http::www.2dgamecreators.com/tutorials/gameprogramming/fonts/FRIGATE_.ttf" Local font:TImageFont=LoadImageFont(url,48) SetImageFont(font) '-------TURN TEXT INTO IMAGE VIA GRABIMAGE Local text:String="HELLO WORLD" Local h:Int=TextHeight("A") Local c:Float=0.0 SetMaskColor 255,255,255 Local img:TImage=CreateImage(600,h) DrawText Text,0,0 GrabImage Img,0,0 '--------NOW CREATE THE RED/YELLOW GRADIENT Cls For Local y:Int=0 To h c=255.0*(y/Float(h)) SetColor 255,c,0 DrawLine 0,y,TextWidth(Text),y Next '-----WRITE THE TEXTIMAGE ONTO THE GRADIENT WITH THE RIGHT MASKCOLOR '-----THEN GRAB IT SetBlend MASKBLEND SetColor 255,255,255 DrawImage Img,0,0 SetMaskColor 0,0,0 GrabImage Img,0,0 '------NOW DISPLAY THE GRABBED IMAGE Local x:Int=0 SetClsColor 50,50,50 SetColor 255,255,255 Repeat Cls DrawImage Img,x,100 x :+ 1; If x>640 x=-ImageWidth(Img) Flip Until KeyDown(KEY_ESCAPE) Or AppTerminate()