Added support for setting background colour of Pdf document.

This commit is contained in:
Robert Osfield
2008-12-09 09:26:51 +00:00
parent c0ac01c576
commit d8c17e4c4c
8 changed files with 25 additions and 13 deletions

View File

@@ -676,7 +676,7 @@ bool InteractiveImageHandler::mousePosition(osgViewer::View* view, osg::NodeVisi
x = int( tc.x() );
y = int( tc.y() );
}
else
else if (_image.valid())
{
x = int( float(_image->s()) * tc.x() );
y = int( float(_image->t()) * tc.y() );
@@ -693,6 +693,8 @@ bool InteractiveImageHandler::mousePosition(osgViewer::View* view, osg::NodeVisi
bool InteractiveImageHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv)
{
if (ea.getHandled()) return false;
if (!_image) return false;
switch(ea.getEventType())
{