Added docs on getPixelAspectRatio and corrected usage of getPixelAspection in osgmovie.cpp
This commit is contained in:
parent
7994ed1eb7
commit
73cffacf09
@ -526,8 +526,8 @@ int main(int argc, char** argv)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"image->s()"<<image->s()<<" image-t()="<<image->t()<<" aspectRatio="<<image->getPixelAspectRatio()<<std::endl;
|
||||
|
||||
float width = image->s();
|
||||
float height = image->t() * image->getPixelAspectRatio();
|
||||
float width = image->s() * image->getPixelAspectRatio();
|
||||
float height = image->t();
|
||||
|
||||
osg::ref_ptr<osg::Drawable> drawable = myCreateTexturedQuadGeometry(pos, width, height,image, useTextureRectangle, xyPlane, flip);
|
||||
|
||||
|
@ -186,7 +186,10 @@ class OSG_EXPORT Image : public Object
|
||||
void setPacking(unsigned int packing) { _packing = packing; }
|
||||
inline unsigned int getPacking() const { return _packing; }
|
||||
|
||||
/** Set the pixel aspect ratio, defined as the pixel width divided by the pixel height.*/
|
||||
inline void setPixelAspectRatio(float pixelAspectRatio) { _pixelAspectRatio = pixelAspectRatio; }
|
||||
|
||||
/** Get the pixel aspect ratio.*/
|
||||
inline float getPixelAspectRatio() const { return _pixelAspectRatio; }
|
||||
|
||||
/** Return the number of bits required for each pixel. */
|
||||
|
Loading…
Reference in New Issue
Block a user