On Tuesday 13 Sep 2011 01:10:55 Tom Breton (Tehom) wrote:
> > On Monday, September 12, 2011, D. Michael McIntyre wrote:
> [...]
> 
> > m_segmentsDrawBuffer is a QPixmap.  QPixmap::resize() no longer exists.
> > The
> > API docs say to replace
> > 
> >   pixmap.resize(width, height)
> > 
> > with
> > 
> >  pixmap = pixmap.copy(0, 0, width, height)
> > 
> > According to the docs, this was the way the conversion was supposed to be
> > done.  I've looked at these lines several times, and I don't see any
> > parameters out of order, type changes, or other things that might explain
> > why
> > what is supposed to be equivalent code is clearly not doing an equivalent
> > job.
> 
> Just to throw my $0.02 in, are "width" and "height" always larger than the
> originals?  And do we know what QPixmap::copy does in that case?
> 
> I ask because http://www.greyc.ensicaen.fr/ensicaen/Docs/Qt4/qpixmap.html
> says that copy "Returns a deep copy of the subset of the pixmap that is
> specified by the given rectangle. "
> 
> So what does it do when the rectangle is too big?  I don't know and it
> doesn't say, but if what it does is copy nothing or make a blank pixmap,
> that might explain what you are seeing.

Of course, in C++ you can pass references implicitly, so it is quite possible 
that pixmap.copy actually modifies width and height in the calling context...

I expect you thought about that about 50ms after seeing the bug, but I 
remember spending a v long time indeed sorting out something which eventually 
came down to that.

I'll shut up now :)

Nick/.

> 
> Or I could be totally wrong, since I'm just learning Qt.
> 
>       Tom Breton (Tehom)
> 
> 
> 
> ---------------------------------------------------------------------------
> --- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the
> BlackBerry® mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry® DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1
> _______________________________________________
> Rosegarden-devel mailing list
> Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
> https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

-- 
Dr Nicholas Bailey                                      
http://www.n-ism.org/People/nick.php
Science and Music Research Group,
School of Engineering, The University of Glasgow

Find out about our Music Informatics MSc:       http://www.n-ism.org/SPECTRUM
Signal Processing, Electronics and Computing Techniques
        for Researching and Understanding Music

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to