[poppler] QT4, API documentation
Wilfried Huss
Wilfried.Huss at gmx.at
Wed Nov 30 13:22:12 PST 2005
Am Tuesday, 29. November 2005 23:24 schrieb Albert Astals Cid:
> A Dimarts 29 Novembre 2005 21:43, Stefan Kebekus va escriure:
> > I had another look at the splashRenderToPixmap method, and I have a few
> > question about that
> >
> > * The API looks a bit absurd. Do you think it can still be changed, or do
> > we have to maintain binary compatibility?
> Not in Qt4 frontend, that's why we have the unstable define ;-)
>
> > If not, I would remove the argument "QPixmap **q", and simply return a
> QPixmap.
> Nope, that's not good, returning a QPixmap will make you copy he QPixmap two
> times, that is, one when creating it
> q = new QPixmap(QPixmap::fromImage(*img));
> and another when you return it and assign it from the application side
> That's what my sometimes good sometimes bad knowledge tells me but i can be
> wrong.
From the Qt documentation:
"The QPixmap class uses implicit sharing, so you can pass QPixmap objects around by value."
So returning pixmaps should not be a problem.
Greetings,
Wilfried Huss.
More information about the poppler
mailing list