Changeset 13041 for OpenSceneGraph/trunk/src/osgWidget/PdfReader.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgWidget/PdfReader.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgWidget/PdfReader.cpp
r12292 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 26 26 open(filename, hints); 27 27 } 28 28 29 29 bool PdfReader::assign(PdfImage* pdfImage, const GeometryHints& hints) 30 30 { … … 40 40 osg::Vec3 widthVec(hints.widthVec); 41 41 osg::Vec3 heightVec(hints.heightVec); 42 42 43 43 switch(hints.aspectRatioPolicy) 44 44 { … … 53 53 break; 54 54 } 55 55 56 56 osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(hints.position, widthVec, heightVec, 57 57 0.0f, flip ? 1.0f : 0.0f , 1.0f, flip ? 0.0f : 1.0f); … … 70 70 71 71 addDrawable(pictureQuad); 72 72 73 73 return true; 74 74 } … … 83 83 { 84 84 if (!_pdfImage) return false; 85 85 86 86 return _pdfImage->page(pageNum); 87 87 } … … 90 90 { 91 91 if (!_pdfImage) return false; 92 92 93 93 return _pdfImage->previous(); 94 94 } … … 97 97 { 98 98 if (!_pdfImage) return false; 99 99 100 100 return _pdfImage->next(); 101 101 }
