Hi Sergej,

the size given in the avg node determines the size and proportions of the 
virtual avg workspace. By default, a window is created that has the same size 
and there is a 1:1-correspondence between avg coordinates and pixels.

If you use player.setResolution(), a window is created that has the proportions 
given in the avg node and at least the size given in the call. The avg 
coordinates are scaled so that the avg node still covers the whole window. This 
is mainly a debugging tool: For setups too large to display on the developer's 
computer, you can use setResolution() to make the window smaller and still see 
everything. In your case, the minimum size 1280x800 and the proportions are 4:3 
(from 800:600), which means the window needs to be 1280x960 pixels large.

Changing the window size after it's been opened isn't supported. I think that 
libSDL, the library responsible for window management, supports this, so it 
should be possible to implement. If you need to create a window who's size is 
only known at runtime, you can generate an avg string on the fly and load it 
using loadFromString().

Cheers,

  Uli

On Jul 10, 2010, at 5:12 PM, Sergej Forat wrote:

>  Hi,
> 
> <avg width="800" height="600"> creates a fixed size window. Is there a 
> way to allow the user to change the size, having width, height as 
> relative(to the window) resolution?
> 
> Trying to force the native resolution/fullscreen:
> player.setResolution(True, 1280, 800, 32)
> 
> Leads to:
> ERROR: Setting SDL video mode failed: No video mode large enough for 
> 1280x960. (width=1280, height=960, bpp=32, multisamplesamples=1).
> 
> I am curious where the 960px height is from?
> 
> What happens if the avg file resolution differs from the set resolution? 
> Will the width, height be overridden leading to an incorrect layout(as 
> it is defined relative to avg width, height)?
> 
> Regards Sergej
> 
> _______________________________________________
> libavg-users mailing list
> [email protected]
> https://mail.datenhain.de/mailman/listinfo/libavg-users
> 

--
Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: [email protected]
Skype: uzadow




_______________________________________________
libavg-users mailing list
[email protected]
https://mail.datenhain.de/mailman/listinfo/libavg-users

Reply via email to