| 867 | | viewport->setViewport(0,0,width,height); |
| 868 | | } |
| 869 | | else |
| 870 | | { |
| 871 | | viewport->x() = static_cast<osg::Viewport::value_type>(double(viewport->x())*widthChangeRatio); |
| 872 | | viewport->y() = static_cast<osg::Viewport::value_type>(double(viewport->y())*heigtChangeRatio); |
| 873 | | viewport->width() = static_cast<osg::Viewport::value_type>(double(viewport->width())*widthChangeRatio); |
| 874 | | viewport->height() = static_cast<osg::Viewport::value_type>(double(viewport->height())*heigtChangeRatio); |
| | 870 | processedViewports.insert(viewport); |
| | 871 | |
| | 872 | if (viewport->x()==0 && viewport->y()==0 && |
| | 873 | viewport->width()>=_traits->width && viewport->height()>=_traits->height) |
| | 874 | { |
| | 875 | viewport->setViewport(0,0,width,height); |
| | 876 | } |
| | 877 | else |
| | 878 | { |
| | 879 | viewport->x() = static_cast<osg::Viewport::value_type>(double(viewport->x())*widthChangeRatio); |
| | 880 | viewport->y() = static_cast<osg::Viewport::value_type>(double(viewport->y())*heigtChangeRatio); |
| | 881 | viewport->width() = static_cast<osg::Viewport::value_type>(double(viewport->width())*widthChangeRatio); |
| | 882 | viewport->height() = static_cast<osg::Viewport::value_type>(double(viewport->height())*heigtChangeRatio); |
| | 883 | } |