; Display the info about the default surface Display_Current_Surface_info_to_Screen(50,50) ; Create a new image CreateFXImage 1,200,100 ; Set this new image as the Current drawing surface RenderToImage 1 Display_Current_Surface_info_to_Screen(50,200) ; Show the screen to the user and wait for a key press Sync WaitKey Function Display_Current_Surface_info_to_Screen(Xpos,Ypos) ; Get the curret drawing surface index SurfaceIndex=GetSurface() ; Get the Type of Surface this is Select GetSurfaceType() Case 1 SurfaceType$="Video" Case 2 SurfaceType$="FX" Case 8 SurfaceType$="AFX" EndSelect ; get the current drawing surfaces width Width=GetSurfaceWidth() ; get the current drawing surfaces Height Height=GetSurfaceHeight() If SurfaceINdex=0 Name$="[Screen]" Else Name$="[Image]" EndIf ; Make the Screen the current drawing surface RenderToScreen ; Display the info at this position Text xpos,ypos, "Surface Name:"+name$ Text xpos,ypos+20,"====================" Text xpos,ypos+40," Surface:"+Str$(SurfaceIndex) Text xpos,ypos+60,"SurfType:"+SurfaceType$ Text xpos,ypos+80," Width:"+Str$(Width) Text xpos,ypos+100," Height:"+Str$(Height) ; Restore the original drawing surface RenderToImage SurfaceIndex EndFunction |