Hi,
OK, first some info - I'm looking to use a windowed screen in my application so that I can draw faster to a window.
Am I correct in thinking the width and height in the OpenWindowedScreen command sets the width and height of the screen itself, and then the x,y,rightoffset and bottomoffset specify the position and size within the window? (Seems to be, but doesn't come out well in the docs.)
The Autostretch parameter - does it work? The code I had is this, and it doesn't (the docs say the display should be resized when the window is but on my system it stays 380x280 pixels in the top-left of the window):
Code: Select all
If InitSprite()=0 : End : EndIf
If OpenWindow(0,5,5,400,300,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget,"GeoWorld")
If OpenWindowedScreen(WindowID(), 10, 10, 380, 280, 1, 0, 0)
ClearScreen(0,0,200)
FlipBuffers()
Else
MessageRequester("foo", "failed to open windowed screen", #PB_MessageRequester_OK)
EndIf
While quitprog=0
ev.l=WaitWindowEvent()
While ev0
Select ev
Case #PB_EventCloseWindow : quitprog=-1
Case #PB_EventRepaint : FlipBuffers() : FlipBuffers()
EndSelect
ev=WindowEvent()
Wend
Wend ; Window main event loop
CloseWindow(0)
EndIf
End
I'm guessing there would be no way to resize a screen (not stretch it) without closing and opening it, so is there some way you can draw a sprite to a window directly, without the screen? It would need a "CreateSprite" command be added to the spritelib though (which would be a generally useful addition I think).
Sorry for the lame questions.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.20)
