marius schebella wrote:
hi trevor,
I'm having a little trouble with screensizes in Gem - has anyone else been through this already?
yes. some problems could be caused by the graphic driver. i had a problems that squares looked like rectangles in fullsreen mode...
this sounds rather like a Gem-bug than a driver-problem.
Is there a function that can tell you the size of the window? Or are there functions that link mouse-coordinates to object coordinates?
this is a bit of a problem, because mouse-coordinates and object-coordinates are *completely* different things.
imagine you are looking at a mountaineous landscape. you can prove that two specific summits have a distance of 10 centimeters, just because you have measured the distance with your fingers (~1m in fron of your head). of course this is non-sense.
the same appies for Gem: object-coordinates refer to relations between objects in a scene, while mouse-coordinates (better: window-coordinates) refer to the projection of this scenery onto your screen.
to convert mouse-coordinates(pixels) to "gem-coordinates" i use
[inlet] minus (windowsize in pixel / 2) minus 1 multiplied by 4
[inlet] | [/ 100] (screensize is 200) | [- 1] | [* 4] | [outlet]
the cvs-version allows for normalized output of the window-coordinates. [gemmouse 1 1] should give the mid-pixel as "0.5 0.5", no matter how the actual screen looks like.
i don't know, if that is an official algorithm, it seems to work with sizes 200, 400, 600 but has some rounding errors with some other screensizes...
depends on the x/y-ratio. obviously, if you want a square to be a square with all window-dimensions, then you will have more space (e.g. need more translation to get out of the screen) in the x-direction if the screen is very wide.
Also (using Windows 98) when I maximise the Gem window, I can't get rid of it again - even with Alt-Tab or by programming the patch to minimise it again. Is there another way to do it?
how do you maximze? this should work, at least it does with XP... btw, there is also a "fullscreen 1" command. for fullscreen mode.
there are a lot of window-managers under linux that cannot handle this properly too: fullscreen-mode (with "fullscreen 1") will disable you to get any other window into the foreground. this is because of the no-border option, which tricks window-managers. you will have to find another way to get control back, eg, by destroying the gem-window with a special click-combination. if you want a big screen just use "dimen 1152x864" or whatever your screensize is (with borders turned on). this should give you all control you want.
mfg.a.srd IOhannes