Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
void Image::copyPixelsTo(Image& targetImage) const {
    Q_ASSERT(compatible(targetImage));
    copyPixels(*this, targetImage);
}
Exemplo n.º 4
0
void Image::copyPixelsFrom(const Image& sourceImage) {
    Q_ASSERT(compatible(sourceImage));
    copyPixels(sourceImage, *this);
}
 virtual bool onRendererFinished(const RendererAbstract*)
 {
   copyPixels();
   return true;
 }