Changeset 3312
- Timestamp:
- 08/23/04 22:29:42 (9 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgProducer/ViewerEventHandler.cpp
r3311 r3312 784 784 unsigned int screenWidth; 785 785 unsigned int screenHeight; 786 unsigned int windowWidth; 787 unsigned int windowHeight; 786 788 rs->getScreenSize( screenWidth, screenHeight ); 787 unsigned int windowWidth = (unsigned int)((float)screenWidth * 0.625); 788 unsigned int windowHeight = (unsigned int)((float)windowWidth * 0.75); 789 if( screenHeight > screenWidth ) 790 { 791 windowWidth = (unsigned int)((float)screenWidth * 0.625); 792 windowHeight = (unsigned int)((float)windowWidth * 0.75); 793 } 794 else 795 { 796 windowHeight = (unsigned int)((float)screenHeight * 0.625); 797 windowWidth = (unsigned int)((float)windowHeight * 1.334); 798 } 789 799 int x = (screenWidth - windowWidth) >> 1; 790 800 int y = (screenHeight - windowHeight) >> 1;
