Cleaned up osgWidget::VncClient and osgWidget::Browser so that their implementations are all more consitent with the osgWidget::PdfReader.

This commit is contained in:
Robert Osfield
2008-12-09 11:05:04 +00:00
parent d8c17e4c4c
commit c8190d9c54
11 changed files with 169 additions and 162 deletions

View File

@@ -21,12 +21,12 @@
using namespace osgWidget;
PdfReader::PdfReader(const std::string& filename, GeometryHints hints)
PdfReader::PdfReader(const std::string& filename, const GeometryHints& hints)
{
open(filename, hints);
}
bool PdfReader::assign(PdfImage* pdfImage, GeometryHints hints)
bool PdfReader::assign(PdfImage* pdfImage, const GeometryHints& hints)
{
if (!pdfImage) return false;
@@ -73,7 +73,7 @@ bool PdfReader::assign(PdfImage* pdfImage, GeometryHints hints)
return true;
}
bool PdfReader::open(const std::string& filename, GeometryHints hints)
bool PdfReader::open(const std::string& filename, const GeometryHints& hints)
{
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(filename);
return assign(dynamic_cast<PdfImage*>(image.get()), hints);