gifloader.cpp   gifloader.cpp 
skipping to change at line 240 skipping to change at line 240
} }
// Render the currently active frame // Render the currently active frame
renderCurScreen(dx, dy, p, sx, sy, width, height); renderCurScreen(dx, dy, p, sx, sy, width, height);
#ifdef DEBUG_GIFLOADER #ifdef DEBUG_GIFLOADER
p->drawText(QPoint(dx - sx, dy - sy + p->fontMetrics().height()), Q String::number(frame)); p->drawText(QPoint(dx - sx, dy - sy + p->fontMetrics().height()), Q String::number(frame));
#endif #endif
} }
virtual AnimProvider* clone(PixmapPlane*) virtual AnimProvider* clone(PixmapPlane *plane)
{ {
return 0; //### FIXME if (frame0->height == 0 || frame0->width == 0 ||
plane->height == 0 || plane->width == 0)
return 0;
float heightRatio = frame0->height / plane->height;
float widthRatio = frame0->width / plane->width;
QVector<GIFFrameInfo> newFrameInfo;
Q_FOREACH(const GIFFrameInfo &oldFrame, frameInfo) {
GIFFrameInfo newFrame(oldFrame);
newFrame.geom.setWidth(oldFrame.geom.width() * widthRatio);
newFrame.geom.setHeight(oldFrame.geom.height() * heightRatio);
newFrame.geom.setX(oldFrame.geom.x() * widthRatio);
newFrame.geom.setY(oldFrame.geom.y() * heightRatio);
newFrameInfo.append(newFrame);
}
return new GIFAnimProvider(plane, image, newFrameInfo, bgColor);
} }
}; };
class GIFLoader: public ImageLoader class GIFLoader: public ImageLoader
{ {
QByteArray buffer; QByteArray buffer;
int bufferReadPos; int bufferReadPos;
public: public:
GIFLoader() GIFLoader()
{ {
 End of changes. 2 change blocks. 
2 lines changed or deleted 20 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/