• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ copyImage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中copyImage函数的典型用法代码示例。如果您正苦于以下问题:C++ copyImage函数的具体用法?C++ copyImage怎么用?C++ copyImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了copyImage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: setPixmap

void SystemTray::updateToolTip()
{
//	return; /////////////////////////////////////////////////////

	Basket *basket = Global::bnpView->currentBasket();
	if (!basket)
		return;

	if (basket->icon().isEmpty() || basket->icon() == "basket" || ! Settings::showIconInSystray())
		setPixmap(basket->isLocked() ? m_lockedIconPixmap : m_iconPixmap);
	else {
		// Code that comes from JuK:
		QPixmap bgPix = loadIcon("basket");
		QPixmap fgPix = SmallIcon(basket->icon());

		QImage bgImage = bgPix.convertToImage(); // Probably 22x22
		QImage fgImage = fgPix.convertToImage(); // Should be 16x16
		QImage lockOverlayImage = loadIcon("lockoverlay").convertToImage();

		KIconEffect::semiTransparent(bgImage);
		copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2,
                  (bgImage.height() - fgImage.height()) / 2);
		if (basket->isLocked())
			KIconEffect::overlay(bgImage, lockOverlayImage);

		bgPix.convertFromImage(bgImage);
		setPixmap(bgPix);
	}

	//QTimer::singleShot( Container::c_delayTooltipTime, this, SLOT(updateToolTipDelayed()) );
	// No need to delay: it's be called when notes are changed:
	updateToolTipDelayed();
}
开发者ID:tytycoon,项目名称:basket,代码行数:33,代码来源:systemtray.cpp


示例2: dequeue

PROC *kfork(char *filename)
{
  int j, segment;
  PROC *p = dequeue(&freeList);
  
  if (p == 0) {
    printf("Failed to kfork()\n");
    getc();
    return(0);
  }
  
  p->status = READY;
  p->priority = 1;
  p->ppid = running->pid;
  p->parent = running;
  p->uss = segment = (p->pid + 1) * 0x1000;
  
  /*
   * INITIALIZE p's kstack to make it start from body() when it runs.
   * To do this, PRETNED that the process called tswitch() from the 
   * the entry address of body() and executed the SAVE part of tswitch()
   * to give up CPU before. 
   * Initialize its kstack[ ] and ksp to comform to these.
   */
  for (j=1; j<10; j++) {
    p->kstack[SSIZE - j] = 0;       // all saved registers = 0
  }
  p->kstack[SSIZE-1]=(int)goUmode;     // called tswitch() from body
  p->ksp = &(p->kstack[SSIZE-9]); // ksp -> kstack top

  //printf("Loading executable\n"); //FOR TESTING
  if(filename)
  {
    load(filename, segment);           // Load executable
    //printf("Executable loaded\n"); //FOR TESTING
    for (j=1; j<13; j++) {
        put_word(0, segment, -j*2);       // Set all registers to 0
    }
    put_word(0x0200, segment, -2);      // Flag
    p->usp = -24;
  }
  else
  {
    copyImage(segment);
    p->usp = running->usp;
    put_word(0, segment, p->usp+16);
  }
  put_word(segment, segment, p->usp+20);     // CS
  put_word(segment, segment, p->usp+2);    // ES
  put_word(segment, segment, p->usp);    // DS
    
  //printProc(p);
  
  enqueue(&readyQueue, p);
  printQueue(readyQueue, freeList, sleepList);
  /*printf("Ready queue:\n");
  print_queue(readyList);*/
  
  return(p->pid);
}
开发者ID:konorati,项目名称:cs460,代码行数:60,代码来源:kernel.c


示例3: copyImage

void MainWidget::updateScreenshotLabel()
{
    ui->imageLabel->setPixmap(originalPixmap.scaled(ui->imageLabel->size(),
                                                     Qt::KeepAspectRatio,
                                                     Qt::SmoothTransformation));
    copyImage();
}
开发者ID:SunRunAway,项目名称:AprilShot,代码行数:7,代码来源:mainwidget.cpp


示例4: setContextMenuPolicy

void MathDisplay::buildActions()
{
	setContextMenuPolicy(Qt::ActionsContextMenu);

	act_copyText = new QAction(tr("Copy text"), this);
	connect(act_copyText, SIGNAL(triggered()), this, SLOT(copyText()));
	this->addAction(act_copyText);

	act_copyLatex = new QAction(tr("Copy LaTeX code"), this);
	connect(act_copyLatex, SIGNAL(triggered()), this, SLOT(copyLatex()));
	this->addAction(act_copyLatex);

	act_copyMml = new QAction(tr("Copy MathML code"), this);
	connect(act_copyMml, SIGNAL(triggered()), this, SLOT(copyMml()));
	this->addAction(act_copyMml);

	act_copyImage = new QAction(tr("Copy image"), this);
	connect(act_copyImage, SIGNAL(triggered()), this, SLOT(copyImage()));
	act_copyImage->setEnabled(false);
	this->addAction(act_copyImage);

	act_saveImage = new QAction(tr("Save image"), this);
	connect(act_saveImage, SIGNAL(triggered()), this, SLOT(saveImage()));
	act_saveImage->setEnabled(false);
	this->addAction(act_saveImage);
}
开发者ID:tobast,项目名称:QGiac,代码行数:26,代码来源:MathDisplay.cpp


示例5: ASSERT

void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
{
    ASSERT(context);
    RefPtr<Image> imageCopy = copyImage(CopyBackingStore);
    imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
开发者ID:pial003,项目名称:RespImg-WebCore,代码行数:7,代码来源:ImageBufferWx.cpp


示例6: imageObserver

void BitmapImage::drawPattern(GraphicsContext& ctxt, const FloatRect& tileRect, const AffineTransform& transform,
    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
{
    if (tileRect.isEmpty())
        return;

    if (!ctxt.drawLuminanceMask()) {
        Image::drawPattern(ctxt, tileRect, transform, phase, spacing, op, destRect, blendMode);
        return;
    }
    if (!m_cachedImage) {
        auto buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(tileRect.size()), ctxt);
        if (!buffer)
            return;

        ImageObserver* observer = imageObserver();
        ASSERT(observer);

        // Temporarily reset image observer, we don't want to receive any changeInRect() calls due to this relayout.
        setImageObserver(nullptr);

        draw(buffer->context(), tileRect, tileRect, op, blendMode, ImageOrientationDescription());

        setImageObserver(observer);
        buffer->convertToLuminanceMask();

        m_cachedImage = buffer->copyImage(DontCopyBackingStore, Unscaled);
        if (!m_cachedImage)
            return;
    }

    ctxt.setDrawLuminanceMask(false);
    m_cachedImage->drawPattern(ctxt, tileRect, transform, phase, spacing, op, destRect, blendMode);
}
开发者ID:lokifist,项目名称:webkit,代码行数:34,代码来源:BitmapImage.cpp


示例7: mTextureType


//.........这里部分代码省略.........
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/

// Include
#include <float.h>
#include <QMessageBox>
#include <QSettings>
#include "constants.h"
#include "hlms_node_samplerblock.h"
#include "hlms_node_porttypes.h"

//****************************************************************************/
HlmsNodeSamplerblock::HlmsNodeSamplerblock(QString title, QGraphicsItem* parent) :
    Magus::QtNode(title, parent),
    mTextureType(0),
    mTextureIndex(0),
    mSamplerblockEnabled(true),
    mTextureAddressingModeU(0),
    mTextureAddressingModeV(0),
    mTextureAddressingModeW(0),
    mMipLodBias(0.0f),
    mMaxAnisotropy(1.0f),
    mCompareFunction(8),
    mMinLod(-FLT_MAX),
    mMaxLod(FLT_MAX),
    mBorderColourRed(255.0f),
    mBorderColourGreen(255.0f),
    mBorderColourBlue(255.0f),
    mUvSet(0),
    mBlendMode(0),
    mMapWeight(1.0f),
    mEmissiveColourRed(0.0f),
    mEmissiveColourGreen(0.0f),
    mEmissiveColourBlue(0.0f),
    mAnimationEnabled(false),
    mSequenceNumber(-1)
{
    mFileNameTexture = QString("");
    mBaseNameTexture = QString("");
    mPathTexture = QString("");
    mOffset = QVector2D(0.0f, 0.0f);
    mScale = QVector2D(1.0f, 1.0f);
    mAnimationScale = QVector2D(1.0f, 1.0f);
    mAnimationTranslate = QVector2D(0.0f, 0.0f);

    // Define the connection policy
    HlmsPbsDatablockSamplerblockPortType hlmsPbsDatablockSamplerblockPortType;
    HlmsSamplerblockDatablockPortType hlmsSamplerblockDatablockPortType;
    hlmsPbsDatablockSamplerblockPortType.addPortTypeToConnectionPolicy(hlmsSamplerblockDatablockPortType);

    // Apply values from settings.cfg
    QSettings settings(FILE_SETTINGS, QSettings::IniFormat);
    mTextureMinFilter = settings.value(SETTINGS_SAMPLERBLOCK_FILTER_INDEX).toInt();
    mTextureMagFilter = settings.value(SETTINGS_SAMPLERBLOCK_FILTER_INDEX).toInt();
    mTextureMipFilter = settings.value(SETTINGS_SAMPLERBLOCK_FILTER_INDEX).toInt();

    // Custome node settings
    setTitleColor(Qt::white);
    setHeaderTitleIcon(ICON_SAMPLERBLOCK);
    setAction1Icon(ICON_MINMAX);
    setAction2Icon(ICON_CLOSE);
    alignTitle(Magus::ALIGNED_LEFT);
    setHeaderColor(QColor("#874E96"));
    mPort = createPort(PORT_ID_SAMPLERBLOCK,
                       PORT_DATABLOCK,
                       hlmsPbsDatablockSamplerblockPortType,
                       QColor("#874E96"),
                       Magus::PORT_SHAPE_CIRCLE,
                       Magus::ALIGNED_LEFT,
                       QColor("#874E96"));

    setPortNameColor(Qt::white);
    setZoom(0.9);
}

//****************************************************************************/
HlmsNodeSamplerblock::~HlmsNodeSamplerblock(void)
{
}

//****************************************************************************/
void HlmsNodeSamplerblock::setFileNameTexture(const QString fileNameTexture, const QPixmap* pixmap)
{
    mFileNameTexture = fileNameTexture;
    if (pixmap)
        copyImage(pixmap);
    else
        setImage(fileNameTexture);
}
开发者ID:spookyboo,项目名称:HLMSEditor,代码行数:101,代码来源:hlms_node_samplerblock.cpp


示例8: drawPattern

void ImageBuffer::drawPattern(GraphicsContext& destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
{
    FloatRect adjustedSrcRect = srcRect;
    adjustedSrcRect.scale(m_resolutionScale, m_resolutionScale);

    if (!context().isAcceleratedContext()) {
        if (&destContext == &context() || destContext.isAcceleratedContext()) {
            if (RefPtr<Image> copy = copyImage(CopyBackingStore)) // Drawing into our own buffer, need to deep copy.
                copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, styleColorSpace, op, destRect, blendMode);
        } else {
            if (RefPtr<Image> imageForRendering = copyImage(DontCopyBackingStore))
                imageForRendering->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, styleColorSpace, op, destRect, blendMode);
        }
    } else {
        if (RefPtr<Image> copy = copyImage(CopyBackingStore))
            copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, styleColorSpace, op, destRect, blendMode);
    }
}
开发者ID:TigerLau1985,项目名称:webkit,代码行数:18,代码来源:ImageBufferCG.cpp


示例9: unPremultiplyImage

LayerGraphics::~LayerGraphics ()
{
  // Convert from premultiplied to normal.
  //
  unPremultiplyImage (m_fill);

  // Extract the layer's RGB components as Image::RGB
  //
  Image fillImage (ChannelImageType::fromImage (m_fill, -1));

  // Extract the layer's alpha mask as a single channel image.
  //
  Image maskImage (ChannelImageType::fromImage (m_fill, PixelARGB::indexA));

  // Obtain bitmap data for mask and fill.
  //
  Pixels fillPixels (fillImage);
  Pixels maskPixels (maskImage);
  Pixels workPixels (m_work);

  m_options.innerShadow (fillPixels, maskPixels);

  m_options.dropShadow (m_work, maskImage);

  if (m_options.general.groupInteriorEffects)
  {
    // satin
    m_options.colourOverlay (fillPixels);
    m_options.gradientOverlay (fillPixels);
    m_options.patternOverlay (fillPixels);
    m_options.innerGlow (fillPixels, maskPixels);
    m_options.fill (m_work, m_fill);
  }
  else
  {
    m_options.fill (m_work, m_fill);
    m_options.colourOverlay (workPixels);
    m_options.gradientOverlay (workPixels);
    m_options.patternOverlay (workPixels);
    m_options.innerGlow (workPixels, maskPixels);
  }

  m_options.outerGlow (workPixels, maskPixels);
  m_options.bevelEmboss (workPixels, maskPixels);
  m_options.stroke (workPixels, maskPixels);

  // Copy the work image onto the background layer
  // using normal mode and the general opacity.
  copyImage (
    m_base,
    m_workOrigin,
    m_work,
    m_work.getBounds (),
    BlendMode::modeNormal,
    m_options.general.opacity);
}
开发者ID:ZECTBynmo,项目名称:VFLib,代码行数:56,代码来源:vf_LayerGraphics.cpp


示例10: copyImage

void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
{
    if (destContext == context()) {
        // We're drawing into our own buffer.  In order for this to work, we need to copy the source buffer first.
        RefPtr<Image> copy = copyImage(CopyBackingStore);
        copy->drawPattern(destContext, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
    } else
        m_data.m_image->drawPattern(destContext, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:10,代码来源:ImageBufferQt.cpp


示例11: copyImage

void FillStyle::operator() (Image destImage, Image fillImage)
{
  copyImage (
    destImage,
    Point <int> (0, 0),
    fillImage,
    fillImage.getBounds (),
    mode,
    opacity);
}
开发者ID:Izhaki,项目名称:LayerEffects,代码行数:10,代码来源:vf_FillStyle.cpp


示例12: fork

int fork()
{
	PROC *p;  int i, child, pid;  u16 segment;

	pid = kfork(0);   // kfork() but do NOT load any Umode image for child
	if (pid < 0){     // kfork failed
		return -1;
	}
	p = &proc[pid];   // we can do this because of static pid

	for (i=0; i<NFD; i++){
		p->fd[i] = running->fd[i];

		if (p->fd[i] != 0){
			p->fd[i]->refCount++;

			if (p->fd[i]->mode == READ_PIPE)
				p->fd[i]->pipe_ptr->nreader++;

			if (p->fd[i]->mode == WRITE_PIPE){
				p->fd[i]->pipe_ptr->nwriter++;
			}
		}
	}

	segment = (pid+1)*0x2000;
	copyImage(running->uss, segment, 32*1024);
	p->uss = segment;
	p->usp = 0x2000 - 24;

	// YOUR CODE to make the child runnable in User mode
	p->kstack[SSIZE -1] =(int)goUmode;
	/**** ADD these : copy file descriptors ****/

	// clean the registers and set flag and uCs and uDs to runnings values
	for (i = 1; i < 13; i++) {
		child = 0x2000 - i*2;
		switch(i){
			case 1: put_word(segment, segment, child); break;
			case 2: put_word(segment, segment, child); break;
			case 3:
			case 4:
			case 5:
			case 6:
			case 7:
			case 8:
			case 9:
			case 10: put_word(0,segment, child); break;
			case 11:
			case 12: put_word(segment, segment, child); break;
		}
	}

	return(p->pid);
}
开发者ID:bhanderson,项目名称:cpts460,代码行数:55,代码来源:forkexec.c


示例13: QLabel

QRImageWidget::QRImageWidget(QWidget *parent):
    QLabel(parent), contextMenu(0)
{
    contextMenu = new QMenu();
    QAction *saveImageAction = new QAction(tr("&Save Image..."), this);
    connect(saveImageAction, SIGNAL(triggered()), this, SLOT(saveImage()));
    contextMenu->addAction(saveImageAction);
    QAction *copyImageAction = new QAction(tr("&Copy Image"), this);
    connect(copyImageAction, SIGNAL(triggered()), this, SLOT(copyImage()));
    contextMenu->addAction(copyImageAction);
}
开发者ID:seraph1188,项目名称:darcoin,代码行数:11,代码来源:receiverequestdialog.cpp


示例14: main

int main(int argc,char** argv)
{
  AnalyzeImage imgin,imgout;
  int x,y,z,labelsToChange,i;
  int intstatus;  
  int inlabel,outlabel;
  bool clobber = true;
  bool status;
  div_t divtmp;

  if(argc < 5) {
    cout << "Usage: relabel_analyze inputfile outputfile inlabel1 outlabel1" << endl;
    return(1);
  }
  intstatus = readImage(argv[1],&imgin);
  if(intstatus != 0) {
    cout << "Could not read the file" << argv[1] << endl;
    return(2);
  }
  status = copyImage(&imgin,&imgout);
  divtmp = div(argc - 3,2);
  if(divtmp.rem == 0) {
    labelsToChange = divtmp.quot;
    
  }
  else {
    cout << " wrong number of inputs" << endl;
    return(3);
  }
  for(i = 0;i < labelsToChange;i++) {
    inlabel = atoi(argv[2*i + 3]);
    outlabel = atoi(argv[2*i + 4]);
    cout << "Changing" << inlabel << "->" << outlabel << endl;
    for(x = 0;x < imgin.header.x_dim;x++) {
      for(y = 0;y < imgin.header.y_dim;y++) {
        for(z = 0;z < imgin.header.z_dim;z++) {
          if(fabs(getVoxelValue(&imgin,x,y,z) - inlabel) < 0.0001)
	    putVoxelValue(&imgout,x,y,z,outlabel);
        }
      }
    }
  }
  intstatus = writeImage(argv[2],&imgout,clobber);
  if(intstatus != 0) {
    cout << "Could not write the file" << argv[2] << endl;
    return(3);
  }
  return(0);



}
开发者ID:jussitohka,项目名称:SVPASEG,代码行数:52,代码来源:relabel_analyze.c


示例15: VEC_XSIZE

// Compute fitness =========================================================
double ObjFunc_nma_alignment::eval(Vector X, int *nerror) {
	int dim = global_nma_prog->numberOfModes;

	for (int i = 0; i < dim; i++) {
		global_nma_prog->trial(i) = X[i];
	}

	int pyramidLevelDisc = 1;
	int pyramidLevelCont = (global_nma_prog->currentStage == 1) ? 1 : 0;

	FileName fnRandom = global_nma_prog->createDeformedPDB(pyramidLevelCont);
	const char * randStr = fnRandom.c_str();

	if (global_nma_prog->currentStage == 1) {
		global_nma_prog->performCompleteSearch(fnRandom, pyramidLevelDisc);
	} else {
		double rot, tilt, psi, xshift, yshift;
		MetaData DF;

		rot = global_nma_prog->bestStage1(
				VEC_XSIZE(global_nma_prog->bestStage1) - 5);
		tilt = global_nma_prog->bestStage1(
				VEC_XSIZE(global_nma_prog->bestStage1) - 4);
		psi = global_nma_prog->bestStage1(
				VEC_XSIZE(global_nma_prog->bestStage1) - 3);
		xshift = global_nma_prog->bestStage1(
				VEC_XSIZE(global_nma_prog->bestStage1) - 2);
		yshift = global_nma_prog->bestStage1(
				VEC_XSIZE(global_nma_prog->bestStage1) - 1);

		size_t objId = DF.addObject();
		FileName fnDown = formatString("%s_downimg.xmp", randStr);
		DF.setValue(MDL_IMAGE, fnDown, objId);
		DF.setValue(MDL_ENABLED, 1, objId);
		DF.setValue(MDL_ANGLE_ROT, rot, objId);
		DF.setValue(MDL_ANGLE_TILT, tilt, objId);
		DF.setValue(MDL_ANGLE_PSI, psi, objId);
		DF.setValue(MDL_SHIFT_X, xshift, objId);
		DF.setValue(MDL_SHIFT_Y, yshift, objId);

		DF.write(formatString("%s_angledisc.xmd", randStr));
		copyImage(global_nma_prog->currentImgName.c_str(), fnDown.c_str());
	}
	double fitness = global_nma_prog->performContinuousAssignment(fnRandom,
			pyramidLevelCont);

	runSystem("rm", formatString("-rf %s* &", randStr));

	global_nma_prog->updateBestFit(fitness, dim);
	return fitness;
}
开发者ID:josegutab,项目名称:scipion,代码行数:52,代码来源:nma_alignment.cpp


示例16: dequeue

PROC *kfork(char *filename)
{
    int j;
    
    // Get free proc, return if none
    PROC *ptr = dequeue(&freeList);
    if (ptr == 0) {
        printf("Failed to kfork()\n");
        getc();
        return(0);
    }
    
    // Set basics
    ptr->status = READY;
    ptr->priority = 1;
    ptr->ppid = running->pid;
    ptr->parent = running;
    ptr->uss = (ptr->pid + 1) * 0x1000;
    
    // Configure kStack
    for (j=1; j<10; j++) {
        ptr->kstack[SSIZE - j] = 0;     // all saved registers = 0
    }
    ptr->kstack[SSIZE-1]=(int)goUmode;  // called tswitch() from body
    ptr->ksp = &(ptr->kstack[SSIZE-9]); // ksp -> kstack top
  
    // Configure uStack
    if (filename) {
	load(filename, ptr->uss);           // Load executable
	for (j=1; j<13; j++) {
	    put_word(0, ptr->uss, -j*2);       // Registers to 0
	}
	put_word(0x0200, ptr->uss, -2);      // Flag
	ptr->usp = -24;
    } else {
	copyImage(ptr->uss);
	ptr->usp = running->usp;
	put_word(0, ptr->uss, ptr->usp + 16);
	//printProc(running);
	//getc();
	//printProc(ptr);
	//getc();
    }
    put_word(ptr->uss, ptr->uss, ptr->usp + 20);	// CS
    put_word(ptr->uss, ptr->uss, ptr->usp + 2);		// ES
    put_word(ptr->uss, ptr->uss, ptr->usp);    		// DS
    
    // Put in readyList and return
    enqueue(&readyList, ptr);
    return(ptr);
}
开发者ID:fossum,项目名称:wsu_cs460,代码行数:51,代码来源:kernel.c


示例17: ASSERT

String ImageBuffer::toDataURL(const String& mimeType, const double* quality, CoordinateSystem) const
{
    ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));

    // QImageWriter does not support mimetypes. It does support Qt image formats (png,
    // gif, jpeg..., xpm) so skip the image/ to get the Qt image format used to encode
    // the m_pixmap image.

    RefPtr<Image> image = copyImage(DontCopyBackingStore);
    QByteArray data;
    if (!encodeImage(*image->nativeImageForCurrentFrame(), mimeType.substring(sizeof "image"), quality, data))
        return "data:,";

    return "data:" + mimeType + ";base64," + data.toBase64().data();
}
开发者ID:Metrological,项目名称:qtwebkit,代码行数:15,代码来源:ImageBufferQt.cpp


示例18: runSelect

void runSelect(unsigned int * d_result)
{
    switch(type)
    {
    case 1:
        copyImage(h_img, d_result, width, height);
        break;
    case 2:
        bilateralFilterRGBA(d_result, width, height, euclidean_delta, filter_radius, iterations, nthreads);
        //bilateralFilterGold(h_img, h_temp, euclidean_delta, width, height, filter_radius);
        //copyImage(h_temp, d_result, width, height);
        break;
    default:
        break;
    }
}
开发者ID:AnkurAnandapu,项目名称:ocelot-fork,代码行数:16,代码来源:bilateralFilter.cpp


示例19: glTexSubImage2D

void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
{
	bool is_set = false;
	
#ifdef _DEBUG
	return;
#endif

#if 1 // no mipmap
	if (level > 0)
		return;
#endif

	if (!GLImpl.tmus[GLImpl.current_tmu].boundtexture) {
		printf("Not texture binded\n");
		return;
	}
		
	GLImpl.device->SetTexture(0, NULL);
	GLTexture * surf = NULL;
	
	if (GLImpl.tmus[GLImpl.current_tmu].boundtexture && GLImpl.tmus[GLImpl.current_tmu].boundtexture->teximg ) {
		surf = GLImpl.tmus[GLImpl.current_tmu].boundtexture->teximg;
	}
	
	if (surf) {
		int srcbytes = src_format_to_bypp(format);
		int dstbytes = dst_format_to_bypp(GLImpl.tmus[GLImpl.current_tmu].boundtexture->internalformat);
		BYTE * surfbuf;
		BYTE * srcdata = (BYTE*) pixels;
		BYTE * dstdata;

		surf->lockTexture(level);

		srcdata = (BYTE*) pixels;
		surfbuf = (BYTE*)surf->getData();		
		dstdata = (BYTE*)surf->getData();
		
		check_format(srcbytes, dstbytes);

		copyImage(xoffset, yoffset, width, height, srcdata, srcbytes, surfbuf, dstbytes);

		surf->unlockTexture(level);

		GLImpl.tmus[GLImpl.current_tmu].boundtexture->dirty = 1;
	}
}
开发者ID:Cancerous,项目名称:massive-tyrion,代码行数:47,代码来源:gl_textures.cpp


示例20: m_name

Theme::Theme(const QString& name)
    : m_name(name)
{
    if (m_name.isEmpty()) {
        QString untitled;
        int count = 0;
        do {
            count++;
            untitled = tr("Untitled %1").arg(count);
        } while (QFile::exists(filePath(untitled)));
        m_name = untitled;
    }
    QSettings settings(filePath(m_name), QSettings::IniFormat);

    // Load background settings
    m_background_type = settings.value("Background/Type", 0).toInt();
    m_background_color = settings.value("Background/Color", "#cccccc").toString();
    m_background_path = settings.value("Background/Image").toString();
    m_background_image = settings.value("Background/ImageFile").toString();
    if (!m_background_path.isEmpty() && m_background_image.isEmpty()) {
        setValue(m_background_image, copyImage(m_background_path));
    }

    // Load foreground settings
    m_foreground_color = settings.value("Foreground/Color", "#cccccc").toString();
    m_foreground_opacity = qBound(0, settings.value("Foreground/Opacity", 100).toInt(), 100);
    m_foreground_width = qBound(500, settings.value("Foreground/Width", 700).toInt(), 2000);
    m_foreground_rounding = qBound(0, settings.value("Foreground/Rounding", 0).toInt(), 100);
    m_foreground_margin = qBound(0, settings.value("Foreground/Margin", 65).toInt(), 250);
    m_foreground_padding = qBound(0, settings.value("Foreground/Padding", 0).toInt(), 250);
    m_foreground_position = qBound(0, settings.value("Foreground/Position", 1).toInt(), 3);

    // Load text settings
    m_text_color = settings.value("Text/Color", "#000000").toString();
    m_text_font.fromString(settings.value("Text/Font", QFont("Times New Roman").toString()).toString());
    m_misspelled_color = settings.value("Text/Misspelled", "#ff0000").toString();

    // Load spacings
    m_indent_first_line = settings.value("Spacings/IndentFirstLine", false).toBool();
    m_line_spacing = qBound(100, settings.value("Spacings/LineSpacing", 100).toInt(), 1000);
    m_paragraph_spacing_above = qBound(0, settings.value("Spacings/ParagraphAbove", 0).toInt(), 1000);
    m_paragraph_spacing_below = qBound(0, settings.value("Spacings/ParagraphBelow", 0).toInt(), 1000);
}
开发者ID:rucinski69,项目名称:focuswriter,代码行数:43,代码来源:theme.cpp



注:本文中的copyImage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ copyLabel函数代码示例发布时间:2022-05-30
下一篇:
C++ copyFrom函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap