JSValue invoke(ExecState* exec, QtPixmapInstance* instance) { int width = instance->width(); int height = instance->height(); RefPtr<ImageData> imageData = ImageData::create(IntSize(width, height)); copyPixels(instance->toImage(), width, height, imageData->data()->data()); return toJS(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), imageData.get()); }
Image& Image::clone(const Image& other) { stride = other.stride; width = other.width; height = other.height; bits_per_pixel = other.bits_per_pixel; fmt = other.fmt; copyPixels(other.pixels, other.width, other.height, other.fmt); return *this; }
void Image::copyPixelsTo(Image& targetImage) const { Q_ASSERT(compatible(targetImage)); copyPixels(*this, targetImage); }
void Image::copyPixelsFrom(const Image& sourceImage) { Q_ASSERT(compatible(sourceImage)); copyPixels(sourceImage, *this); }
virtual bool onRendererFinished(const RendererAbstract*) { copyPixels(); return true; }