Question #1 : I'm trying to render some text (font) to an image. Is there a similar function to DrawSprite() only for text or do i need to do something else?
Question #2: I am using render to image in my example. I setvirtualesolution to 512x256, draw a 512x256 red box. I expect to end up with a red box but it is shrunk vertically and has borders. What am i doing wrong?
// set window properties
SetWindowTitle( "Render" )
SetWindowSize( 1024, 768, 0 )
//SetErrorMode( 2 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetVSync( 30 )
SetScissor( 0, 0, 0, 0 )
SetOrientationAllowed( 0, 0,1, 0 )
setvirtualresolution(512, 256)
ri = CreateRenderImage( 512, 256, 0, 0 )
SetRenderToImage(ri, 0)
DrawBox(0, 0, 512, 256, MakeColor(0xff, 00, 00), MakeColor(0xff, 00, 00), MakeColor(0xff, 00, 00), MakeColor(0xff, 00, 00), 1)
SetRenderToScreen()
SetClearColor(0x40, 0x40, 0x40)
ClearScreen()
SetVirtualResolution(1024, 768)
rs = createsprite(ri)
SetSpritePositionByOffset(rs, 512, 384)
// main loop
do
Sync ( )
loop