News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

Alpha Blended Text & Font Rendering

Started by kevin, March 23, 2022, 06:58:28 AM

Previous topic - Next topic

kevin

 Alpha Blended Text & Font Rendering


PlayBASIC Code: [Select]
         openscreen 1200,900,32,1

; setfps 100
loadfont "arial",2,24,0,8
fontdrawmode 2,1

screen=newimage(getScreenWidth(),GetScreenHeight(),2)

setfont 2
do
rendertoimage screen
cls $203050

lockbuffer
rows=40
for lp =0 to rows
Alpha = ClipRange(level+lp*5,0,255)
Ink Argb(Alpha,255,255,0)
y=lp*Gettextheight("\")
x=cos((Level+lp*5)*(360/256.0))*100
text x-180,y, Make$("Alpha Blended Text ",10)

next
Level=Level+1 and 255
unlockbuffer
text 10,10,fps()


rendertoscreen
drawimage Screen ,0,0,false
sync
loop spacekey() or esckey()






   Keywords: CRF, Font, Alpha Blending


Related Articles:

    --  Tree Parallax