Demonstration of rotating text character orientation while plotting them along a path.
nomainwin WindowWidth =500 WindowHeight =500 open "test" for graphics_nsb as #mg #mg "trapclose [quit]" hw = hwnd( #mg) calldll #user32, "GetDC", hw as ulong, hdc as ulong t$ ="This just shows how versatile Liberty BASIC is. Thanks, Carl!" #mg "home ; fill darkblue ; color cyan ; backcolor darkblue" L =len( t$) for i =1 to L angle =0 -10 *int( 360 *i /L) weight =600 +10 * i height =20 +int( i /2) calldll #gdi32, "SelectObject", hdc as ulong, hfont as ulong, oldhfont as ulong calldll #gdi32, "CreateFontA", height as long, 0 as long, angle as long, angle as long, weight as long, 0 as long, _ 0 as long, 0 as long, 0 as long, 0 as long, 0 as long, 0 as long, 0 as long, "Ubuntu" as ptr, hfont as ulong #mg "place "; 250 +( 150 +i) *sinR( 360 * i /L); " "; 250 -( 150 +i) *cosR( 360 * i /L) c =int( 100 +i /L *155) #mg "color "; c; " 160 "; 255 -c #mg "\"; mid$( t$, i, 1) next i wait [quit] close #mg end function sinR( th) sinR =sin( th *3.14159265 /180) end function function cosR( th) cosR =cos( th *3.14159265 /180) end function