window size...

window size...

Post by Jan Panhof » Sat, 14 Jun 2003 00:20:51



Hi again,

I tried to get the windowsize from my SbViewportRegion but the window size
is said to be 400 x 400 at a ratio of 1 - my mouse-cursor coordinates tell
me, that the window is at least 700 x 470. How can I get the REAL size of
the window?

Thanks in advance :-)

Jan

 
 
 

window size...

Post by Christoph Hintermülle » Sat, 14 Jun 2003 03:47:06


Hi Jan


> Hi again,

> I tried to get the windowsize from my SbViewportRegion but the window
size
> is said to be 400 x 400 at a ratio of 1 - my mouse-cursor coordinates
tell
> me, that the window is at least 700 x 470. How can I get the REAL size of
> the window?

Where did you get the SbViewportRegion from ??
From Camera of a specific viewer or viewer itself??

Did you ever tell the viewer of your SbViewportRegion and/or the camera ???
Are you sure you measured the renderarea and not the whole Viewer window
including the decorations icn buttons and thumb wheels ???

Tell a bit more about your SbViewport region and where you got it from ....
Show the relevant parts of your code ....

please otherwhise you hardly will get any help mostly beeing as general
and thumb like this one
cu
Christoph

 
 
 

window size...

Post by Jan Panhof » Sat, 14 Jun 2003 16:06:19


Hi again,

OK, what I am doing is:

//Code start
mainwin = SoQt::init("kkk");
 myRenderArea = new SoQtRenderArea(mainwin);
 viewport = myRenderArea->getViewportRegion();

....
//gets the viewport from the main
SbViewportRegion harbour = ((View *) userData)->getViewport();

SbVec2s windowsize = harbour.getViewportSizePixels();
short window_width;
short window_height;

windowsize.getValue(window_width,window_height);
//Code end

It returns 400x400.
I hope this code helps solving the problem...

Tanks in advance :-)
Jan


Hi Jan


> Hi again,

> I tried to get the windowsize from my SbViewportRegion but the window=

size

Quote:> is said to be 400 x 400 at a ratio of 1 - my mouse-cursor coordinates=

tell
Quote:> me, that the window is at least 700 x 470. How can I get the REAL siz=
e of
> the window?

Where did you get the SbViewportRegion from ??
From Camera of a specific viewer or viewer itself??

Did you ever tell the viewer of your SbViewportRegion and/or the camera=
 ???
Are you sure you measured the renderarea and not the whole Viewer windo=
w
including the decorations icn buttons and thumb wheels ???

Tell a bit more about your SbViewport region and where you got it from =
....
Show the relevant parts of your code ....

please otherwhise you hardly will get any help mostly beeing as general=

and thumb like this one
cu
Christoph

 
 
 

window size...

Post by Lars J. A » Sat, 14 Jun 2003 17:45:02




> Hi again,

> OK, what I am doing is:

> //Code start
> mainwin = SoQt::init("kkk");
>  myRenderArea = new SoQtRenderArea(mainwin);
>  viewport = myRenderArea->getViewportRegion();

> ....
> //gets the viewport from the main
> SbViewportRegion harbour = ((View *) userData)->getViewport();

> SbVec2s windowsize = harbour.getViewportSizePixels();
> short window_width;
> short window_height;

> windowsize.getValue(window_width,window_height);
> //Code end

> It returns 400x400.
> I hope this code helps solving the problem...

The viewport instance you fetch at initialization won't be updated
as the viewer changes size - you need to actually fetch the viewport
from the viewer each time you want to check the size, and not just
return a viewport the viewer returned once upon a time...

  Lars J
--
Reality is that which, when you stop believing in it, does not go away. -- PKD

 
 
 

1. buffer size vs window size

When a double buffered window is resized, what happens to the color/depth
buffers?

I'm guessing they get resized also and that their size reflect bitdepth
and windowsize (bitdpeth * windowsize, for color buffer). Correct?

V-man

2. How to find line-edge intersection on concave polygon?

3. Relationship between font size and window size

4. Layout cloner plugin- where?

5. Window Size with different Res/Font sizes?

6. Screen shot

7. E-machine window size?

8. Computer Animation at Comlumbia College (Chicago)

9. Control Window Size in buttonfly???

10. change videoout window size

11. OpenGL/GLX window sizes

12. How to set maximum window size in 4Dwm???

13. Gnuplot window size