I was wondering if this would work?
a function is getting a pointer to a QImage as a parameter.
I want to copy the entire QImage to a buffer of that is going to hold 100 QImages.
public:
protected:
enum{size = 100};
int front; // points to the front of the buffer
public:
void function(QImage *frame);
protected:
enum{size = 100};
QImage *data[size];
int front; // points to the front of the buffer
To copy to clipboard, switch view to plain text mode
void Buffer
::function(QImage *frame
) {
++front; // Increment front.
if (front == size)
front = 0; // Wrap around.
data[front] = frame;
}
void Buffer::function(QImage *frame)
{
++front; // Increment front.
if (front == size)
front = 0; // Wrap around.
data[front] = frame;
}
To copy to clipboard, switch view to plain text mode
cheers
Bookmarks